From d337cd8b79286df5494262294a0d9559f789b64e Mon Sep 17 00:00:00 2001 From: dim Date: Fri, 20 Jan 2012 19:18:11 +0000 Subject: Pull in r148240 from upstream llvm trunk: Make sure the non-SSE lowering for fences correctly clobbers EFLAGS. PR11768. In particular, this fixes segfaults during the build of devel/icu on i386. The __sync_synchronize() builtin used for implementing icu's internal barrier could lead to incorrect behaviour. MFC after: 3 days --- contrib/llvm/lib/Target/X86/X86InstrCompiler.td | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/llvm/lib/Target/X86/X86InstrCompiler.td b/contrib/llvm/lib/Target/X86/X86InstrCompiler.td index da28690..612b2fa 100644 --- a/contrib/llvm/lib/Target/X86/X86InstrCompiler.td +++ b/contrib/llvm/lib/Target/X86/X86InstrCompiler.td @@ -533,7 +533,7 @@ def ATOMSWAP6432 : I<0, Pseudo, (outs GR32:$dst1, GR32:$dst2), // Memory barriers // TODO: Get this to fold the constant into the instruction. -let isCodeGenOnly = 1 in +let isCodeGenOnly = 1, Defs = [EFLAGS] in def OR32mrLocked : I<0x09, MRMDestMem, (outs), (ins i32mem:$dst, GR32:$zero), "lock\n\t" "or{l}\t{$zero, $dst|$dst, $zero}", -- cgit v1.1