Skip to content

Commit 8b3b4a9

Browse files
authored
[RISCV] Fix canFoldToVWWithSameExtension allowing different FP extensions (#87978)
1 parent 2abd71e commit 8b3b4a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14090,7 +14090,7 @@ canFoldToVWWithSameExtensionImpl(SDNode *Root, const NodeExtensionHelper &LHS,
1409014090
return CombineResult(NodeExtensionHelper::getSExtOpcode(Root->getOpcode()),
1409114091
Root, LHS, /*LHSExt=*/{ExtKind::SExt}, RHS,
1409214092
/*RHSExt=*/{ExtKind::SExt});
14093-
if ((AllowExtMask & ExtKind::FPExt) && RHS.SupportsFPExt)
14093+
if ((AllowExtMask & ExtKind::FPExt) && LHS.SupportsFPExt && RHS.SupportsFPExt)
1409414094
return CombineResult(NodeExtensionHelper::getFPExtOpcode(Root->getOpcode()),
1409514095
Root, LHS, /*LHSExt=*/{ExtKind::FPExt}, RHS,
1409614096
/*RHSExt=*/{ExtKind::FPExt});

0 commit comments

Comments
 (0)