[x86] Fix wrong lowering of vsetcc nodes (PR25080).
[oota-llvm.git] / test / CodeGen / X86 / pr14088.ll
index bd08f2c106588dfd761438a0bf1d334221857acb..16f20d0500a122f5bad689889cff2ec1463fffe7 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc -mtriple x86_64-linux -mcpu core %s -o - | FileCheck %s
+; RUN: llc -mtriple x86_64-linux -mcpu core2 -verify-machineinstrs %s -o - | FileCheck %s
 define i32 @f(i1 %foo, i16* %tm_year2, i8* %bar, i16 %zed, i32 %zed2) {
 entry:
   br i1 %foo, label %return, label %if.end
@@ -19,7 +19,14 @@ return:
   ret i32 %retval.0
 }
 
-; We were miscompiling this and using %ax instead of %cx in the movw.
-; CHECK: movswl        %cx, %ecx
-; CHECK: movw  %cx, (%rsi)
-; CHECK: movslq        %ecx, %rcx
+; We were miscompiling this and using %ax instead of %cx in the movw
+; in the following sequence:
+;      movswl  %cx, %ecx
+;      movw    %cx, (%rsi)
+;      movslq  %ecx, %rcx
+;
+; We can't produce the above sequence without special SD-level
+; heuristics. Now we produce this:
+; CHECK: movw  %ax, (%rsi)
+; CHECK: cwtl
+; CHECK: cltq