[llvm] fix assertion failure in intrinsic distributive laws (PR #216483)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 15 08:49:48 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) {
----------------
dtcxzyw wrote:

You need to get the IR reproducer first using `clang -emit-llvm -S -mllvm -opt-bisect-limit=<n>`. It should be reproduced successfully with `opt -passes=instcombine`. Then you should use `llvm-reduce` to minimize the reproducer. Note that the InstCombine pass should be disabled during reduction via `--ir-passes=`.


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


More information about the llvm-commits mailing list