diff options
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/X86/dagcombine-shifts.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/dagcombine-shifts.ll b/llvm/test/CodeGen/X86/dagcombine-shifts.ll index e5a67d7efc1..905cf052c39 100644 --- a/llvm/test/CodeGen/X86/dagcombine-shifts.ll +++ b/llvm/test/CodeGen/X86/dagcombine-shifts.ll @@ -187,6 +187,8 @@ entry: ; Once the add is removed, the number of uses becomes one and therefore the ; dags are canonicalized. After Legalization, we need to make sure that the ; valuetype for the shift count is legal. +; Verify also that we correctly fold the shl-shr sequence into an +; AND with bitmask. define void @g(i32 %a) { %b = lshr i32 %a, 2 @@ -197,5 +199,11 @@ define void @g(i32 %a) { ret void } +; CHECK-LABEL: @g +; CHECK-NOT: shr +; CHECK-NOT: shl +; CHECK: and +; CHECK-NEXT: jmp + declare void @f(i64) |

