I noticed a an assertion error when building MIPS code that loaded from
NULL. Loading from NULL ends up being a load with maximum alignment, and
due to integer truncation the value maximum was interpreted as 0 and the
assertion in MipsDAGToDAGISel::Select() failed. This previously happened
to work, but the maximum alignment was increased in
df84c1fe78130a86445d57563dea742e1b85156a, so it no longer fits into a 32
bit integer.
Instead of just fixing the one MIPS case, this patch removes all uses of
the deprecated getAlignment() call and replaces them with getAlign().
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thx a lot for this patch. It was on my plate for a very long time but I haven't had time to do it.
Please fix the M68k issue before submitting.
llvm/lib/Target/AMDGPU/R600ISelLowering.cpp | ||
---|---|---|
1006 | You may want to keep it for documentation purposes but this is always true by definition. The Align type guarantees to be >=1. | |
llvm/lib/Target/M68k/M68kInstrInfo.td | ||
525 | This should be LD->getAlign(). Same below. I ran the test on my side with the patch applied. Using LD instead of Ld fixes the build for M68k. |
You may want to keep it for documentation purposes but this is always true by definition. The Align type guarantees to be >=1.