[LLVMdev] 16bit loads being promoted to 32bit?
Eli Friedman
eli.friedman at gmail.com
Thu Feb 12 17:52:09 PST 2009
On Thu, Feb 12, 2009 at 4:53 PM, Villmow, Micah <Micah.Villmow at amd.com> wrote:
> The
> problem that I am having is somewhere along the line the 16bit load is being
> promoted to a 32bit load
For the given testcase, that's clearly illegal. Either there's a
serious bug in LLVM, or you're misinterpreting the meaning of the DAG.
Are you sure you aren't seeing a sign-extending load? If you don't
want to bother supporting extending loads, you can use
setLoadExtAction to make Legalize take care of it.
> 1) I'm limited to 32bit aligned loads and llvm is assuming a
> 16bit/8bit alignment
You shouldn't be seeing any unaligned loads post-Legalize unless you
explicitly ask for them by setting allowUnalignedMemoryAccesses to
true.
-Eli
More information about the llvm-dev
mailing list