[llvm] [DAGCombine] Propagate truncate to operands (PR #98666)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 18 20:47:07 PDT 2024
================
@@ -5798,10 +5801,12 @@ SDValue DAGCombiner::hoistLogicOpWithSameOpcodeHands(SDNode *N) {
if (LegalOperations && !TLI.isOperationLegal(LogicOpcode, XVT))
return SDValue();
// Be extra careful sinking truncate. If it's free, there's no benefit in
- // widening a binop. Also, don't create a logic op on an illegal type.
+ // widening a binop.
if (TLI.isZExtFree(VT, XVT) && TLI.isTruncateFree(XVT, VT))
return SDValue();
- if (!TLI.isTypeLegal(XVT))
+ // Prevent an infinite loop if the target preferts the inverse
----------------
topperc wrote:
prefers*
https://github.com/llvm/llvm-project/pull/98666
More information about the llvm-commits
mailing list