diff options
Diffstat (limited to 'llvm/test/Transforms/GVN/pr12979.ll')
| -rw-r--r-- | llvm/test/Transforms/GVN/pr12979.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Transforms/GVN/pr12979.ll b/llvm/test/Transforms/GVN/pr12979.ll index 0198a56513e..919c22de02a 100644 --- a/llvm/test/Transforms/GVN/pr12979.ll +++ b/llvm/test/Transforms/GVN/pr12979.ll @@ -77,3 +77,17 @@ define i32 @test7(i32 %x, i32 %y) { %foo = add i32 %add1, %add2 ret i32 %foo } + +declare void @mumble(i2, i2) + +define void @test8(i2 %x) { +; CHECK-LABEL: @test8( +; CHECK: %[[ashr:.*]] = ashr i2 %x, 1 +; CHECK-NEXT: call void @mumble(i2 %[[ashr]], i2 %[[ashr]]) +; CHECK-NEXT: ret void + + %ashr0 = ashr exact i2 %x, 1 + %ashr1 = ashr i2 %x, 1 + call void @mumble(i2 %ashr0, i2 %ashr1) + ret void +} |

