[llvm] [InstCombine] Fix Failure to convert vector fp comparisons that can be represented as integers #82241 (PR #83274)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 28 08:18:13 PST 2024
================
@@ -7286,6 +7286,10 @@ Instruction *InstCombinerImpl::visitICmpInst(ICmpInst &I) {
Instruction *InstCombinerImpl::foldFCmpIntToFPConst(FCmpInst &I,
Instruction *LHSI,
Constant *RHSC) {
+ if (RHSC->getType()->isVectorTy()) {
+ if (Constant *CV = RHSC->getSplatValue(false))
+ RHSC = CV;
+ }
----------------
RKSimon wrote:
@dtcxzyw m_APFloat proposal is better
https://github.com/llvm/llvm-project/pull/83274
More information about the llvm-commits
mailing list