[clang] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)
Nikita Popov via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 12 05:50:47 PDT 2023
================
@@ -3,8 +3,9 @@
define ptr @f1(ptr %arg, i64 %arg1) {
; CHECK-LABEL: @f1(
-; CHECK-NEXT: [[TMP1:%.*]] = getelementptr [6 x i32], ptr [[ARG:%.*]], i64 3, i64 [[ARG1:%.*]]
-; CHECK-NEXT: ret ptr [[TMP1]]
+; CHECK-NEXT: [[TMP1:%.*]] = getelementptr i8, ptr [[ARG:%.*]], i64 72
+; CHECK-NEXT: [[TMP2:%.*]] = getelementptr [6 x i32], ptr [[TMP1]], i64 0, i64 [[ARG1:%.*]]
----------------
nikic wrote:
Possible regression. We kind of want to move in his direction, though it happens by accident here.
https://github.com/llvm/llvm-project/pull/68882
More information about the cfe-commits
mailing list