Re: [llvm-commits] [llvm] r41775 - in /llvm/trunk: lib/Target/X86/X86InstrInfo.td lib/Target/X86/X86InstrSSE.td lib/Target/X86/X86InstrX86-64.td test/CodeGen/X86/zero-remat.ll

2007-09-14 Thread Evan Cheng
On Sep 10, 2007, at 1:48 PM, Dan Gohman wrote: Hi Dan, This is not safe because xor will clobber flags. It's a miscompilation if the user of the rematerialized value is a conditional move (e.g. cmovne). Thanks for spotting that! The current fix is to X86RegisterInfo::reMaterialize()

[llvm-commits] [llvm] r41775 - in /llvm/trunk: lib/Target/X86/X86InstrInfo.td lib/Target/X86/X86InstrSSE.td lib/Target/X86/X86InstrX86-64.td test/CodeGen/X86/zero-remat.ll

2007-09-14 Thread Dan Gohman
Are you saying such a fix exists already, or that this is how a fix should work? If the latter, I'd prefer to just revert the change to the instructions that use xor so that they are not marked rematerializable for now (though the ones that use pxor/xorps/xorpd are ok). s/current/correct

Re: [llvm-commits] [llvm] r41775 - in /llvm/trunk: lib/Target/X86/X86InstrInfo.td lib/Target/X86/X86InstrSSE.td lib/Target/X86/X86InstrX86-64.td test/CodeGen/X86/zero-remat.ll

2007-09-10 Thread Dan Gohman
Hi Dan, This is not safe because xor will clobber flags. It's a miscompilation if the user of the rematerialized value is a conditional move (e.g. cmovne). Thanks for spotting that! The current fix is to X86RegisterInfo::reMaterialize() should rematerialize it as a move

[llvm-commits] [llvm] r41775 - in /llvm/trunk: lib/Target/X86/X86InstrInfo.td lib/Target/X86/X86InstrSSE.td lib/Target/X86/X86InstrX86-64.td test/CodeGen/X86/zero-remat.ll

2007-09-07 Thread Dan Gohman
Author: djg Date: Fri Sep 7 16:32:51 2007 New Revision: 41775 URL: http://llvm.org/viewvc/llvm-project?rev=41775view=rev Log: Avoid storing and reloading zeros and other constants from stack slots by flagging the associated instructions as being trivially rematerializable. Added: