[PATCH] D15157: CodeGen peephole: fold redundant phys reg copies

JF Bastien via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 13:50:26 PST 2015


jfb updated this revision to Diff 41672.
jfb added a comment.

Restrict to non-allocatable physical registers.

I tried using MachineRegisterInfo::isConstantPhysReg instead but that's too
conservative and doesn't include the main motivator for this patch: EFLAGS.

This implements the change qcolombet suggested and passes all x86 tests,
including the new test I added incdec-and-branch.ll.


http://reviews.llvm.org/D15157

Files:
  lib/CodeGen/PeepholeOptimizer.cpp
  test/CodeGen/X86/incdec-and-branch.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15157.41672.patch
Type: text/x-patch
Size: 9599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151202/9ed4f726/attachment.bin>


More information about the llvm-commits mailing list