[PATCH] [X86] Special-case 2x CMOV when custom-inserting.
Ahmed Bougacha
ahmed.bougacha at gmail.com
Mon Mar 2 16:23:41 PST 2015
Thanks for the review, will commit shortly!
-Ahmed
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:18117
@@ +18116,3 @@
+ MachineInstr *NextCMOV = nullptr;
+ {
+ MachineBasicBlock::iterator InstrIt = MI;
----------------
MatzeB wrote:
> I'm probably missing something, but it seems unnecessary to me to open a new block.
Unnecessary yes, originally to hide the short-lived declarations. I'll drop it.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:18118-18119
@@ +18117,4 @@
+ {
+ MachineBasicBlock::iterator InstrIt = MI;
+ ++InstrIt;
+ if (InstrIt != BB->end() && InstrIt->getOpcode() == MI->getOpcode() &&
----------------
MatzeB wrote:
> MachineBasicBlock::iterator InstrIt = std::next(MI); ? I'd also choose a name like NextMIIt;
I don't think that works. Since MI is a pointer, I'd expect that to be the same as
(MI + 1)
which is different from
&*(MBB::iterator(MI) + 1)
http://reviews.llvm.org/D8019
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list