[Mlir-commits] [mlir] [mlir][LLVMIR] Skip or and shl folding for mismatched constant types (PR #226026)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Sep 24 01:04:23 PDT 2026


================
@@ -88,6 +88,36 @@ llvm.func @or_basic() -> i32 {
 
 // -----
 
+// A constant-like op can fold to an attribute whose type differs from its
+// result type. Do not fold llvm.or using such an attribute.
+// CHECK-LABEL: llvm.func @or_mismatched_lhs
----------------
AkunCube wrote:

Done

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


More information about the Mlir-commits mailing list