[llvm] [InstCombine] fix assertion failure in intrinsic distributive laws (PR #216483)
Andreas Jonson via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 15 14:04:34 PDT 2026
================
@@ -0,0 +1,19 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -S -passes=instcombine %s | FileCheck %s
+
+declare i32 @llvm.smin.i32(i32, i32)
+
+define i32 @test_intrinsic_distributive_laws_crash(i32 %g, i32 %h, i32 %i) {
----------------
andjo403 wrote:
hmm this seems like a bit annoying to test as the crash depend on the order that users() is in when pushUsersToWorkList adds them to the worklist https://github.com/llvm/llvm-project/blob/367b306e9c12e16621b27e606bfbb765166a6b96/llvm/include/llvm/Transforms/Utils/InstructionWorklist.h#L106-L109
so not so easy to make a test as any change of the list of users can result in that the fault case was not triggered.
shall we even have a test for this?
https://github.com/llvm/llvm-project/pull/216483
More information about the llvm-commits
mailing list