[PATCH] D38085: Use the basic cost if a GEP is not used as addressing mode
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 3 14:01:42 PDT 2017
efriedma accepted this revision.
efriedma added a comment.
Oh, I see, cast<Operator>(U) will crash in cases where the user is something else, like a global variable.
A ConstantExpr GEP could still be free in certain cases (e.g. on x86-64 a GEP of a global variable could get lowered to a RIP-relative load instruction), but maybe not worth worrying about.
https://reviews.llvm.org/D38085
More information about the llvm-commits
mailing list