summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Transforms/InstCombine/2004-11-22-Missed-and-fold.ll9
-rw-r--r--test/Transforms/InstCombine/and.ll6
2 files changed, 9 insertions, 6 deletions
diff --git a/test/Transforms/InstCombine/2004-11-22-Missed-and-fold.ll b/test/Transforms/InstCombine/2004-11-22-Missed-and-fold.ll
new file mode 100644
index 0000000000..8702c5e343
--- /dev/null
+++ b/test/Transforms/InstCombine/2004-11-22-Missed-and-fold.ll
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep and
+; XFAIL: *
+
+sbyte %test21(sbyte %A) {
+ %C = shr sbyte %A, ubyte 7 ;; sign extend
+ %D = and sbyte %C, 1 ;; chop off sign
+ ret sbyte %D
+}
+
diff --git a/test/Transforms/InstCombine/and.ll b/test/Transforms/InstCombine/and.ll
index e11be02997..67b34a3be5 100644
--- a/test/Transforms/InstCombine/and.ll
+++ b/test/Transforms/InstCombine/and.ll
@@ -137,12 +137,6 @@ ubyte %test20(ubyte %A) {
ret ubyte %D
}
-sbyte %test21(sbyte %A) {
- %C = shr sbyte %A, ubyte 7 ;; sign extend
- %D = and sbyte %C, 1 ;; chop off sign
- ret sbyte %D
-}
-
bool %test22(int %A) {
%B = seteq int %A, 1
%C = setge int %A, 3