File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -132,3 +132,21 @@ loop:
132
132
call void @use (i32 %v ) memory(none)
133
133
br label %loop
134
134
}
135
+
136
+ ; FIXME: This is a miscompile.
137
+ define i32 @test_splat_gep_capture (<1 x i32 > %index ) {
138
+ ; CHECK-LABEL: define i32 @test_splat_gep_capture(
139
+ ; CHECK-SAME: <1 x i32> [[INDEX:%.*]]) {
140
+ ; CHECK-NEXT: [[A:%.*]] = alloca i32, align 4
141
+ ; CHECK-NEXT: store i32 123, ptr [[A]], align 4
142
+ ; CHECK-NEXT: [[PTRS:%.*]] = getelementptr inbounds i32, ptr [[A]], <1 x i32> [[INDEX]]
143
+ ; CHECK-NEXT: call void @some_call(<1 x ptr> [[PTRS]])
144
+ ; CHECK-NEXT: ret i32 123
145
+ ;
146
+ %a = alloca i32
147
+ store i32 123 , ptr %a
148
+ %ptrs = getelementptr inbounds i32 , ptr %a , <1 x i32 > %index
149
+ call void @some_call (<1 x ptr > %ptrs )
150
+ %reload = load i32 , ptr %a
151
+ ret i32 %reload
152
+ }
You can’t perform that action at this time.
0 commit comments