[llvm] [DirectX] add GEP i8 legalization (PR #142475)

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 3 17:53:25 PDT 2025


================
@@ -110,8 +110,8 @@ define i32 @all_imm() {
 define i32 @scalar_i8_geps() {
   ; CHECK-LABEL: define i32 @scalar_i8_geps(
   ; CHECK-NEXT:    [[ALLOCA:%.*]] = alloca i32, align 4
-  ; CHECK-NEXT:    [[GEP:%.*]] = getelementptr inbounds nuw i32, ptr [[ALLOCA]], i32 0
-  ; CHECK-NEXT:    [[LOAD:%.*]] = load i32, ptr [[GEP]], align 4
+  ; CHECK-NEXT:    [[GEP:%.*]] = getelementptr inbounds nuw [1 x i32], ptr [[ALLOCA]], i32 0, i32 0
----------------
farzonl wrote:

sorry  -filetype=obj  https://godbolt.org/z/bjEq84qME

I'm seeing the following validation failures:
```
error: Unknown part 'ISG1' found in DXIL container.
error: Unknown part 'OSG1' found in DXIL container.
error: Unknown part 'PSV0' found in DXIL container.
error: Missing part 'Runtime Data (RDAT)' required by module.
Validation failed.
```
Nothing though that would indicate an issue with GEP.

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


More information about the llvm-commits mailing list