> 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 instruction. 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). Dan -- Dan Gohman, Cray Inc. _______________________________________________ llvm-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
