aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/select-i8.ll12
-rw-r--r--test/CodeGen/X86/subclass-coalesce.ll17
2 files changed, 12 insertions, 17 deletions
diff --git a/test/CodeGen/X86/select-i8.ll b/test/CodeGen/X86/select-i8.ll
new file mode 100644
index 0000000..8b2444d
--- /dev/null
+++ b/test/CodeGen/X86/select-i8.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | llc -march=x86 > %t
+; RUN: not grep movz %t
+; RUN: not grep cmov %t
+; RUN: grep movb %t | count 2
+
+; Don't try to use a 16-bit conditional move to do an 8-bit select,
+; because it isn't worth it. Just use a branch instead.
+
+define i8 @foo(i1 inreg %c, i8 inreg %a, i8 inreg %b) {
+ %d = select i1 %c, i8 %a, i8 %b
+ ret i8 %d
+}
diff --git a/test/CodeGen/X86/subclass-coalesce.ll b/test/CodeGen/X86/subclass-coalesce.ll
deleted file mode 100644
index 2673be7..0000000
--- a/test/CodeGen/X86/subclass-coalesce.ll
+++ /dev/null
@@ -1,17 +0,0 @@
-; RUN: llvm-as < %s | llc -march=x86 -stats |& grep {Number of cross class joins performed}
-
-@mem.6 = external global i64 ; <i64*> [#uses=1]
-
-define i64 @attachFunc() nounwind {
-entry:
- %tmp64.i = add i64 0, 72 ; <i64> [#uses=1]
- %tmp68.i = load i64* @mem.6, align 8 ; <i64> [#uses=1]
- %tmp70.i = icmp sgt i64 %tmp64.i, %tmp68.i ; <i1> [#uses=1]
- br i1 %tmp70.i, label %bb73.i, label %bb116
-
-bb73.i: ; preds = %entry
- br label %bb116
-
-bb116: ; preds = %bb73.i, %entry
- ret i64 %tmp68.i
-}