Skip to content

Commit 3e8703d

Browse files
RKSimonAlexisPerry
authored andcommitted
[X86] computeKnownBitsForPMADDWD - the final addition of the signextended multiplies is not guaranteed to be NSW
https://rust.godbolt.org/z/3f1bevnoT https://alive2.llvm.org/ce/z/cjixBY Noticed by @alexfh
1 parent 37e24e5 commit 3e8703d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37158,7 +37158,7 @@ static void computeKnownBitsForPMADDWD(SDValue LHS, SDValue RHS,
3715837158
KnownBits RHSHi = DAG.computeKnownBits(RHS, DemandedHiElts, Depth + 1);
3715937159
KnownBits Lo = KnownBits::mul(LHSLo.sext(32), RHSLo.sext(32));
3716037160
KnownBits Hi = KnownBits::mul(LHSHi.sext(32), RHSHi.sext(32));
37161-
Known = KnownBits::computeForAddSub(/*Add=*/true, /*NSW=*/true,
37161+
Known = KnownBits::computeForAddSub(/*Add=*/true, /*NSW=*/false,
3716237162
/*NUW=*/false, Lo, Hi);
3716337163
}
3716437164

0 commit comments

Comments
 (0)