llvm-ar: Clean up memory management with OwningPtr.
[oota-llvm.git] / test / Transforms / InstSimplify / AndOrXor.ll
index 3d04d584f48f483f163fd6323cc8108c117df8a7..33a4d6b02d638f1f0cfbb12626bd9fe6bc462c03 100644 (file)
@@ -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
+}