[llvm] [InstCombine] Match scalable splats in m_ImmConstant (PR #132522)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 3 06:00:29 PDT 2025


lukel97 wrote:

> Hi, Could this be the cause of these test-suite failures ?
> 
> https://lab.llvm.org/buildbot/#/builders/41/builds/5897 https://lab.llvm.org/buildbot/#/builders/4/builds/6002 https://lab.llvm.org/buildbot/#/builders/199/builds/2539 https://lab.llvm.org/buildbot/#/builders/143/builds/6643 https://lab.llvm.org/buildbot/#/builders/17/builds/6974 https://lab.llvm.org/buildbot/#/builders/198/builds/3365
> 
> I am not sure at all about this. This is just because the issue seems to be in the InstCombine area
> 
> ```
> clang++: ../llvm/llvm/lib/Analysis/InstructionSimplify.cpp:3931: Value *simplifyICmpInst(CmpPredicate, Value *, Value *, const SimplifyQuery &, unsigned int): Assertion `RExt && "Constant-fold of ImmConstant should not fail"' failed.                                                                                                                                                    
> 
> Stack dump:
>  #0 0x0000ab90f89a6890 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/clang+++0x81c6890)
>  #1 0x0000ab90f89a478c llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/clang+++0x81c478c)
>  #2 0x0000ab90f890c294 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
>  #3 0x0000f61a9946b8f8 (linux-vdso.so.1+0x8f8)
>  #4 0x0000f61a98ecf1f0 __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
>  #5 0x0000f61a98e8a67c gsignal ./signal/../sysdeps/posix/raise.c:27:6
>  #6 0x0000f61a98e77130 abort ./stdlib/abort.c:81:7
>  #7 0x0000f61a98e83fd4 __assert_fail_base ./assert/assert.c:91:7
>  #8 0x0000f61a98e8404c (/lib/aarch64-linux-gnu/libc.so.6+0x3404c)
>  #9 0x0000ab90f7a542fc simplifyICmpInst(llvm::CmpPredicate, llvm::Value*, llvm::Value*, llvm::SimplifyQuery const&, unsigned int) InstructionSimplify.cpp:0:0
> #10 0x0000ab90f7a60bc8 isDivZero(llvm::Value*, llvm::Value*, llvm::SimplifyQuery const&, unsigned int, bool) InstructionSimplify.cpp:0:0
> #11 0x0000ab90f7a60318 simplifyDivRem(llvm::Instruction::BinaryOps, llvm::Value*, llvm::Value*, llvm::SimplifyQuery const&, unsigned int) InstructionSimplify.cpp:0:0
> #12 0x0000ab90f7a60e78 simplifyRem(llvm::Instruction::BinaryOps, llvm::Value*, llvm::Value*, llvm::SimplifyQuery const&, unsigned int) InstructionSimplify.cpp:0:0
> #13 0x0000ab90f86662ac llvm::InstCombinerImpl::visitURem(llvm::BinaryOperator&) InstCombineMulDivRem.cpp:0:0
> #14 0x0000ab90f85b45f8 llvm::InstCombinerImpl::run() InstructionCombining.cpp:0:0
> #15 0x0000ab90f85b7a4c combineInstructionsOverFunction(llvm::Function&, llvm::InstructionWorklist&, llvm::AAResults*, llvm::AssumptionCache&, llvm::TargetLibraryInfo&, llvm::TargetTransformInfo&, llvm::DominatorTree&, llvm::OptimizationRemarkEmitter&, llvm::BlockFrequencyInfo*, llvm::BranchProbabilityInfo*, llvm::ProfileSummaryInfo*, llvm::InstCombineOptions const&) InstructionCombining.cpp:0:0
> #16 0x0000ab90f85b70e0 llvm::InstCombinePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1.install/bin/clang+++0x7dd70e0)
> ```

Oh thanks for pointing that out, I didn't notice the InstructionSimplify failure. Yesterday I mainly saw some errors about a missing` Transforms/Vectorize/./VectorizeTests/18/53` test, so maybe that got buried in the buildbot emails. Taking a look now

https://github.com/llvm/llvm-project/pull/132522


More information about the llvm-commits mailing list