Skip to content

Commit b95ad8e

Browse files
authored
[DAGCombine] Use isLegalExtLoad for MatchLoadCombine (#140536)
This looks wrong to me, but I don't have a test case where it alters the generated code.
1 parent 32cf55a commit b95ad8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9482,8 +9482,8 @@ SDValue DAGCombiner::MatchLoadCombine(SDNode *N) {
94829482
// split into legal sized loads. This enables us to combine i64 load by i8
94839483
// patterns to a couple of i32 loads on 32 bit targets.
94849484
if (LegalOperations &&
9485-
!TLI.isOperationLegal(NeedsZext ? ISD::ZEXTLOAD : ISD::NON_EXTLOAD,
9486-
MemVT))
9485+
!TLI.isLoadExtLegal(NeedsZext ? ISD::ZEXTLOAD : ISD::NON_EXTLOAD, VT,
9486+
MemVT))
94879487
return SDValue();
94889488

94899489
// Check if the bytes of the OR we are looking at match with either big or

0 commit comments

Comments
 (0)