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

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 3 16:59:28 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:

use llc to generate DXIL https://godbolt.org/z/59KEE8rT9 feed that in to the validator

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


More information about the llvm-commits mailing list