[PATCH] D44402: [DAGCombiner] Fold (zext (and/or/xor (shl/shr (load x), cst), cst))

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 26 08:02:47 PDT 2018


samparker added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:7527
+  // operand, so we use the max of them.
+  if (VT.bitsGT(ShiftVT))
+    ShiftVT = VT;
----------------
I would of thought that the actual problem was that previously you didn't use the VT from the shift at all, so I'm not convinced that you need to perform this check and select the max. In my mind, ShiftVT should be fine.


https://reviews.llvm.org/D44402





More information about the llvm-commits mailing list