diff options
Diffstat (limited to 'test/Transforms/InstSimplify/AndOrXor.ll')
-rw-r--r-- | test/Transforms/InstSimplify/AndOrXor.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/InstSimplify/AndOrXor.ll b/test/Transforms/InstSimplify/AndOrXor.ll index 3d04d584f4..33a4d6b02d 100644 --- a/test/Transforms/InstSimplify/AndOrXor.ll +++ b/test/Transforms/InstSimplify/AndOrXor.ll @@ -10,3 +10,13 @@ define i64 @pow2(i32 %x) { ret i64 %e2 ; CHECK: ret i64 %e } + +define i64 @pow2b(i32 %x) { +; CHECK: @pow2b + %sh = shl i32 2, %x + %e = zext i32 %sh to i64 + %nege = sub i64 0, %e + %e2 = and i64 %e, %nege + ret i64 %e2 +; CHECK: ret i64 %e +} |