[PATCH] D32916: [DAGCombine] (addcarry 0, 0, X) -> (ext/trunc X)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 5 10:31:09 PDT 2017
RKSimon added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2146
+
+ // fold (addcarry 0, 0, X) -> (ext/trunc X) and no carry.
+ if (isNullConstant(N0) && isNullConstant(N1))
----------------
I'm not sure if you can do this - aren't carry bits boolean types? So won't they be TargetLowering::BooleanContent?
getBoolExtOrTrunc doesn't quite work - you're wanting a 0 or 1 result......
https://reviews.llvm.org/D32916
More information about the llvm-commits
mailing list