[AVX512] Bring back vector-shuffle lowering support through broadcasts
[oota-llvm.git] / test / CodeGen / X86 / 2012-01-16-mfence-nosse-flags.ll
1 ; RUN: llc < %s -mtriple=i686-linux -mattr=-sse | FileCheck %s
2 ; PR11768
3
4 @ptr = external global i8*
5
6 define void @baz() nounwind ssp {
7 entry:
8   %0 = load i8** @ptr, align 4
9   %cmp = icmp eq i8* %0, null
10   fence seq_cst
11   br i1 %cmp, label %if.then, label %if.else
12
13 ; Make sure the fence comes before the comparison, since it
14 ; clobbers EFLAGS.
15
16 ; CHECK: lock
17 ; CHECK-NEXT: orl {{.*}}, (%esp)
18 ; CHECK-NEXT: testl [[REG:%e[a-z]+]], [[REG]]
19
20 if.then:                                          ; preds = %entry
21   tail call void bitcast (void (...)* @foo to void ()*)() nounwind
22   br label %if.end
23
24 if.else:                                          ; preds = %entry
25   tail call void bitcast (void (...)* @bar to void ()*)() nounwind
26   br label %if.end
27
28 if.end:                                           ; preds = %if.else, %if.then
29   ret void
30 }
31
32 declare void @foo(...)
33
34 declare void @bar(...)