llvm-6502/test/CodeGen/X86/2012-01-16-mfence-nosse-flags.ll
Rafael Espindola 890a876e0e Print "lock \t foo" instead of "lock \n foo".
This gets gas and llc -filetype=obj to agree on the order of prefixes.

For llvm-mc we need to fix the asm parser to know that it makes a difference
on which line the "lock" is in.

Part of pr23594.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238232 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-26 18:35:10 +00:00

34 lines
901 B
LLVM

; 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*, i8** @ptr, align 4
%cmp = icmp eq i8* %0, null
fence seq_cst
br i1 %cmp, label %if.then, label %if.else
; Make sure the fence comes before the comparison, since it
; clobbers EFLAGS.
; CHECK: lock orl {{.*}}, (%esp)
; CHECK-NEXT: testl [[REG:%e[a-z]+]], [[REG]]
if.then: ; preds = %entry
tail call void bitcast (void (...)* @foo to void ()*)() nounwind
br label %if.end
if.else: ; preds = %entry
tail call void bitcast (void (...)* @bar to void ()*)() nounwind
br label %if.end
if.end: ; preds = %if.else, %if.then
ret void
}
declare void @foo(...)
declare void @bar(...)