fix invalid load folding with SSE/AVX FP logical instructions (PR22371)
[oota-llvm.git] / test / CodeGen / X86 / 2012-01-16-mfence-nosse-flags.ll
index cd8a16f5732a2304c7d1d04417d8e17a16b6fe59..a6c34b8fffa1c2d62b36073b0acf43d4be27f832 100644 (file)
@@ -1,11 +1,11 @@
-; RUN: llc < %s -mtriple=i686-linux -mattr=-sse | FileCheck %s
+; RUN: llc < %s -verify-machineinstrs -mtriple=i686-linux -mattr=-sse | FileCheck %s
 ; PR11768
 
 @ptr = external global i8*
 
 define void @baz() nounwind ssp {
 entry:
-  %0 = load i8** @ptr, align 4
+  %0 = load i8*, i8** @ptr, align 4
   %cmp = icmp eq i8* %0, null
   fence seq_cst
   br i1 %cmp, label %if.then, label %if.else
@@ -13,8 +13,7 @@ entry:
 ; Make sure the fence comes before the comparison, since it
 ; clobbers EFLAGS.
 
-; CHECK: lock
-; CHECK-NEXT: orl {{.*}}, (%esp)
+; CHECK: lock orl {{.*}}, (%esp)
 ; CHECK-NEXT: testl [[REG:%e[a-z]+]], [[REG]]
 
 if.then:                                          ; preds = %entry