[Mlir-commits] [llvm] [mlir] [OMPIRBuilder] Replace getAllocatedType with getAllocationSize (PR #181844)
Jack Styles
llvmlistbot at llvm.org
Mon Feb 23 01:15:19 PST 2026
================
@@ -48,9 +48,9 @@ llvm.func @_QPtest() {
// CHECK: %[[VAL_15:.*]] = call ptr @__kmpc_omp_task_alloc(ptr @1, i32 %[[VAL_14]], i32 1, i64 40, i64 24, ptr @_QPtest..omp_par)
// CHECK: %[[VAL_16:.*]] = load ptr, ptr %[[VAL_15]], align 8
// CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %[[VAL_16]], ptr align 1 %[[STRUCTARG]], i64 24, i1 false)
-// CHECK: %[[VAL_17:.*]] = getelementptr { i64, i64, i64 }, ptr %[[VAL_16]], i32 0, i32 0
-// CHECK: %[[VAL_18:.*]] = getelementptr { i64, i64, i64 }, ptr %[[VAL_16]], i32 0, i32 1
-// CHECK: %[[VAL_19:.*]] = getelementptr { i64, i64, i64 }, ptr %[[VAL_16]], i32 0, i32 2
+// CHECK: %[[VAL_17:.*]] = getelementptr { i64, i64, i64, ptr }, ptr %[[VAL_16]], i32 0, i32 0
+// CHECK: %[[VAL_18:.*]] = getelementptr { i64, i64, i64, ptr }, ptr %[[VAL_16]], i32 0, i32 1
+// CHECK: %[[VAL_19:.*]] = getelementptr { i64, i64, i64, ptr }, ptr %[[VAL_16]], i32 0, i32 2
// CHECK: %[[VAL_20:.*]] = load i64, ptr %[[VAL_19]], align 4
----------------
Stylie777 wrote:
Thanks for the update to the test. Can we add the following line after the GEP's into the bounds? We check at the bottom there is no task duplication function, but it would be good to ensure the GEP is not generated as this is undefined behaviour.
```
// CHECK-NOT: %[[VAL_INVALID:.*]] = getelementptr {i64, i64, i64, ptr}, ptr %[[VAL_16]], i32 0, i32 3
```
https://github.com/llvm/llvm-project/pull/181844
More information about the Mlir-commits
mailing list