[PATCH] D146622: [AggressiveInstCombine] folding load for constant global patterened arrays and structs by GEP indices
Kohei Asano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 24 03:17:10 PDT 2023
khei4 added inline comments.
================
Comment at: llvm/test/Transforms/AggressiveInstCombine/patterned-load.ll:53-60
+; CHECK-NEXT: [[TMP1:%.*]] = call ptr @llvm.ptrmask.p0.i64(ptr @constarray1, i64 [[MASK:%.*]])
+; CHECK-NEXT: [[TMP2:%.*]] = getelementptr inbounds i16, ptr [[TMP1]], i64 [[IDX:%.*]]
+; CHECK-NEXT: [[TMP3:%.*]] = load i8, ptr [[TMP2]], align 1
+; CHECK-NEXT: ret i8 [[TMP3]]
;
%1 = call ptr @llvm.ptrmask.p0.i64(ptr @constarray1, i64 %mask)
+ %2 = getelementptr inbounds i16, ptr %1, i64 %idx
----------------
Tweaked this case not to be folded by alignment.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146622/new/
https://reviews.llvm.org/D146622
More information about the llvm-commits
mailing list