[PATCH] D66778: [Loads/SROA] Remove blatantly incorrect code and fix a bug revealed in the process
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 12:16:31 PDT 2019
reames marked an inline comment as done.
reames added inline comments.
================
Comment at: lib/Analysis/Loads.cpp:268
+ if (AccessedPtr == V &&
+ LoadSize <= DL.getTypeStoreSize(AccessedTy))
return true;
----------------
jdoerfert wrote:
> Can we have a test for this? I would hope something where we want to pre-loads a 64 bit pointer but only have a 32 bit access?
I've been sitting here trying to write that test for most of the morning. :)
Most existing callers pass a size which is the pointer size. The sole exception is the phi-speculation code in SROA, and I haven't figured out how to trigger it there just yet. My previously added select tests demonstrate the *spirit* of the problem, but don't actually expose the current bug.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66778/new/
https://reviews.llvm.org/D66778
More information about the llvm-commits
mailing list