diff options
author | Sanjay Patel <spatel@rotateright.com> | 2019-10-19 16:57:02 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2019-10-19 16:57:02 +0000 |
commit | 0d04cbb5783c50f77f8d4c136f2dd529aa112ff9 (patch) | |
tree | c766b5eda681befa867e399008f3e627e65c50bb /test | |
parent | 316641232816e55c56eed1ac49e7e8f214444382 (diff) |
[TargetLowering][DAGCombine][MSP430] add/use hook for Shift Amount Threshold (1/2)
Provides a TLI hook to allow targets to relax the emission of shifts, thus enabling
codegen improvements on targets with no multiple shift instructions and cheap selects
or branches.
Contributes to a Fix for PR43559:
https://bugs.llvm.org/show_bug.cgi?id=43559
Patch by: @joanlluch (Joan LLuch)
Differential Revision: https://reviews.llvm.org/D69116
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/MSP430/shift-amount-threshold.ll | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/test/CodeGen/MSP430/shift-amount-threshold.ll b/test/CodeGen/MSP430/shift-amount-threshold.ll index a9c25a44533..633cd785dc1 100644 --- a/test/CodeGen/MSP430/shift-amount-threshold.ll +++ b/test/CodeGen/MSP430/shift-amount-threshold.ll @@ -4,13 +4,9 @@ define i16 @testSimplifySetCC_0(i16 %a) { ; CHECK-LABEL: testSimplifySetCC_0: ; CHECK: ; %bb.0: ; %entry -; CHECK-NEXT: and #32, r12 -; CHECK-NEXT: clrc -; CHECK-NEXT: rrc r12 -; CHECK-NEXT: rra r12 -; CHECK-NEXT: rra r12 -; CHECK-NEXT: rra r12 -; CHECK-NEXT: rra r12 +; CHECK-NEXT: bit #32, r12 +; CHECK-NEXT: mov r2, r12 +; CHECK-NEXT: and #1, r12 ; CHECK-NEXT: ret entry: %and = and i16 %a, 32 @@ -22,13 +18,9 @@ entry: define i16 @testSimplifySetCC_1(i16 %a) { ; CHECK-LABEL: testSimplifySetCC_1: ; CHECK: ; %bb.0: ; %entry -; CHECK-NEXT: and #32, r12 -; CHECK-NEXT: clrc -; CHECK-NEXT: rrc r12 -; CHECK-NEXT: rra r12 -; CHECK-NEXT: rra r12 -; CHECK-NEXT: rra r12 -; CHECK-NEXT: rra r12 +; CHECK-NEXT: bit #32, r12 +; CHECK-NEXT: mov r2, r12 +; CHECK-NEXT: and #1, r12 ; CHECK-NEXT: ret entry: %and = and i16 %a, 32 |