[PATCH] D23445: [x86] Refactor a PowerPC specific ctlz/srl transformation (NFC).

pierre gousseau via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 10:27:29 PDT 2016


pgousseau added inline comments.

================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:3572
@@ +3571,3 @@
+  ISD::CondCode CC = cast<CondCodeSDNode>(Op.getOperand(2))->get();
+  SDLoc dl(Op);
+  if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op.getOperand(1))) {
----------------
spatel wrote:
> I think it's ok for this patch to be a cut-and-paste and NFC, but a couple of possible improvements for a follow-up:
> 1. Sink 'dl' below the first two 'if' statements.
> 2. Do we need to use a target-specific type rather than hard-coding MVT::i32 under this?
> 
Sounds good, only I am not sure I understand point 2, are you suggesting to pass the value type as a parameter to this new method?


https://reviews.llvm.org/D23445





More information about the llvm-commits mailing list