[PATCH] D42986: [TargetLowering] try to create -1 constant operand for math ops via demanded bits
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 23:16:09 PST 2018
craig.topper added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:1246
+ SDValue Neg1 = TLO.DAG.getAllOnesConstant(dl, VT);
+ SDValue NewMath = TLO.DAG.getNode(Op.getOpcode(), dl, VT, Op0, Neg1);
+ return TLO.CombineTo(Op, NewMath);
----------------
Do we need to do anything with NSW/NUW flags?
https://reviews.llvm.org/D42986
More information about the llvm-commits
mailing list