[PATCH] D23359: [x86] X86ISelLowering zext(add_nuw(x, C)) --> add(zext(x), C_zext)
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 10 13:21:52 PDT 2016
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM. See inline comment for one nit. Also, unless there's some reason to break this regression test off by itself, I'd prefer to add this test directly to the related test file (and rename the file so it's not inaccurate). Keeping the tests next to each other for context seems better to me.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:30492
@@ -30478,3 +30491,3 @@
SDValue AddOp0 = Add.getOperand(0);
- SDValue NewSext = DAG.getNode(ISD::SIGN_EXTEND, SDLoc(Sext), VT, AddOp0);
+ SDValue NewSext = DAG.getNode(Ext->getOpcode(), SDLoc(Ext), VT, AddOp0);
SDValue NewConstant = DAG.getConstant(AddConstant, SDLoc(Add), VT);
----------------
This should be named 'NewExt' now for consistency.
https://reviews.llvm.org/D23359
More information about the llvm-commits
mailing list