[PATCH] D34576: [ConstantHoisting] Avoid hoisting constants in GEPs that index into a struct type.

Pirama Arumuga Nainar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 10:26:46 PDT 2017


pirama added a reviewer: rnk.
pirama added inline comments.


================
Comment at: test/Transforms/ConstantHoisting/ARM/gep-struct-index.ll:12
+; CHECK:        %addr2 = getelementptr %T, %T* %P, i32 %const, i32 256
+  %addr1 = getelementptr %T, %T* %P, i32 256, i32 256
+  %tmp1 = load i32, i32* %addr1
----------------
Can you add a comment here clarifying that the first index into the pointer is hoisted, but the second index into the struct isn't?


https://reviews.llvm.org/D34576





More information about the llvm-commits mailing list