[PATCH] D98588: [InstCombine] Restrict a GEP transform to avoid changing provenance

Simonas Kazlauskas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 13 11:58:19 PST 2021


nagisa added a comment.

Not sure what's up with the other test changes, annotated the POIs with inline comments.



================
Comment at: llvm/test/Transforms/InstCombine/getelementptr.ll:1094
+; CHECK-NEXT:    [[SHR:%.*]] = sdiv i64 [[SUB]], 7
+; CHECK-NEXT:    [[GEP:%.*]] = getelementptr inbounds [[STRUCT_C:%.*]], %struct.C* [[C1]], i64 [[SHR]]
 ; CHECK-NEXT:    ret %struct.C* [[GEP]]
----------------
This is a genuine test change.


================
Comment at: llvm/test/Transforms/InstCombine/getelementptr.ll:1292
 
+define i8* @D_TBD(i8* %c1, i64 %offset) {
+; CHECK-LABEL: @D_TBD(
----------------
This is a newly added test. This does not optimize at all with -O3 if we remove the transform in question.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98588/new/

https://reviews.llvm.org/D98588



More information about the llvm-commits mailing list