[llvm] 8b3b4a9 - [RISCV] Fix canFoldToVWWithSameExtension allowing different FP extensions (#87978)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 8 04:20:40 PDT 2024
Author: Luke Lau
Date: 2024-04-08T19:20:36+08:00
New Revision: 8b3b4a92adee40483c27f26c478a384cd69c6f05
URL: https://github.com/llvm/llvm-project/commit/8b3b4a92adee40483c27f26c478a384cd69c6f05
DIFF: https://github.com/llvm/llvm-project/commit/8b3b4a92adee40483c27f26c478a384cd69c6f05.diff
LOG: [RISCV] Fix canFoldToVWWithSameExtension allowing different FP extensions (#87978)
Added:
Modified:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 279d8a435a04ca..b426f1a7b3791d 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -14090,7 +14090,7 @@ canFoldToVWWithSameExtensionImpl(SDNode *Root, const NodeExtensionHelper &LHS,
return CombineResult(NodeExtensionHelper::getSExtOpcode(Root->getOpcode()),
Root, LHS, /*LHSExt=*/{ExtKind::SExt}, RHS,
/*RHSExt=*/{ExtKind::SExt});
- if ((AllowExtMask & ExtKind::FPExt) && RHS.SupportsFPExt)
+ if ((AllowExtMask & ExtKind::FPExt) && LHS.SupportsFPExt && RHS.SupportsFPExt)
return CombineResult(NodeExtensionHelper::getFPExtOpcode(Root->getOpcode()),
Root, LHS, /*LHSExt=*/{ExtKind::FPExt}, RHS,
/*RHSExt=*/{ExtKind::FPExt});
More information about the llvm-commits
mailing list