[PATCH] D15157: CodeGen peephole: fold redundant phys reg copies
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 3 15:34:32 PST 2015
qcolombet accepted this revision.
qcolombet added a comment.
This revision is now accepted and ready to land.
LGTM.
Thanks,
Q.
================
Comment at: lib/CodeGen/PeepholeOptimizer.cpp:1537
@@ +1536,3 @@
+ if (!MI->isCopy()) {
+ for (const auto &Op : MI->operands()) {
+ // Visit all operands: definitions can be implicit or explicit.
----------------
Yes, I mean readonly :).
Yes, it has to declare its clobbers.
What I meant was that if we do not check for the regmask operand, the check "MI->hasUnmodeledSideEffects()” was not enough to ensure we won’t clobber the registers.
================
Comment at: test/CodeGen/X86/peephole-na-phys-copy-folding.ll:6
@@ +5,3 @@
+; EFLAGS. Make sure the flags are used directly, instead of needlessly using
+; lahf, whne possible.
+
----------------
s/whne/when
http://reviews.llvm.org/D15157
More information about the llvm-commits
mailing list