[PATCH] D51654: Reland r341269: [Constant Hoisting] Hoisting Constant GEP Expressions
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 4 13:50:27 PDT 2018
efriedma added inline comments.
================
Comment at: lib/Transforms/Scalar/ConstantHoisting.cpp:649
+ // offset, but are of different types, their number of indices must be
+ // different. For example:
+ // %0 = type { [16 x i8], i16, %1]
----------------
This is unfortunately not true; it's possible to have an array of length 0 as a member of a struct.
Can you just use stable_sort here, instead of trying to impose an ordering on GEPs with the same offset?
Repository:
rL LLVM
https://reviews.llvm.org/D51654
More information about the llvm-commits
mailing list