Skip to content

Commit 1604c24

Browse files
authored
[AArch64] Fix copy and paste error in tryCombineMULLWithUZP1() (NFCI) (#97729)
The bitcast check was performed on the wrong value in one of the branches. I believe this doesn't actually result in any behavior difference, because the following code looking at ExtractHigh users currently doesn't try to look through BITCASTS. I've left a TODO for that. Fixes #94761.
1 parent 4132ab8 commit 1604c24

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24833,7 +24833,7 @@ static SDValue tryCombineMULLWithUZP1(SDNode *N,
2483324833
} else if (isEssentiallyExtractHighSubvector(RHS) &&
2483424834
LHS.getOpcode() == ISD::TRUNCATE) {
2483524835
TruncHigh = LHS;
24836-
if (LHS.getOpcode() == ISD::BITCAST)
24836+
if (RHS.getOpcode() == ISD::BITCAST)
2483724837
ExtractHigh = RHS.getOperand(0);
2483824838
else
2483924839
ExtractHigh = RHS;
@@ -24862,6 +24862,7 @@ static SDValue tryCombineMULLWithUZP1(SDNode *N,
2486224862
// This dagcombine assumes the two extract_high uses same source vector in
2486324863
// order to detect the pair of the mull. If they have different source vector,
2486424864
// this code will not work.
24865+
// TODO: Should also try to look through a bitcast.
2486524866
bool HasFoundMULLow = true;
2486624867
SDValue ExtractHighSrcVec = ExtractHigh.getOperand(0);
2486724868
if (ExtractHighSrcVec->use_size() != 2)

0 commit comments

Comments
 (0)