[clang] [CIR] Use declarative TableGen constraints for overflow flag verification (PR #195476)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Tue May 5 22:50:47 PDT 2026
================
@@ -134,7 +134,7 @@ void test_sized_array_delete(SizedArrayDelete *ptr) {
// LLVM: [[DELETE_NOTNULL]]:
// LLVM: %[[ALLOC_PTR:.*]] = getelementptr i8, ptr %[[PTR]], i64 -8
// LLVM: %[[NUM_ELEM:.*]] = load i64, ptr %[[ALLOC_PTR]], align 4
-// LLVM: %[[ARRAY_SIZE:.*]] = mul i64 4, %[[NUM_ELEM]]
+// LLVM: %[[ARRAY_SIZE:.*]] = mul i64 %[[NUM_ELEM]], 4
----------------
xlauko wrote:
Yeah, that is unfortunate property of MLIR canonicalizer putting all constants to "suffix" on commutative operations. :/
https://github.com/llvm/llvm-project/pull/195476
More information about the cfe-commits
mailing list