[clang] [llvm] [InstCombine] Split GEPs with multiple non-zero offsets (PR #151333)
Nikita Popov via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 30 06:30:15 PDT 2025
================
@@ -266,7 +268,10 @@ define i1 @test10_struct_noinbounds_i16(i16 %x) {
define i1 @test10_struct_arr(i32 %x) {
; CHECK-LABEL: @test10_struct_arr(
-; CHECK-NEXT: [[R:%.*]] = icmp ne i32 [[X:%.*]], 1
+; CHECK-NEXT: [[P_SPLIT:%.*]] = getelementptr inbounds [4 x %Foo], ptr @GStructArr, i32 0, i32 [[X:%.*]]
+; CHECK-NEXT: [[P:%.*]] = getelementptr inbounds nuw i8, ptr [[P_SPLIT]], i32 8
+; CHECK-NEXT: [[Q:%.*]] = load i32, ptr [[P]], align 4
+; CHECK-NEXT: [[R:%.*]] = icmp eq i32 [[Q]], 9
----------------
nikic wrote:
Regression.
https://github.com/llvm/llvm-project/pull/151333
More information about the cfe-commits
mailing list