[PATCH] D138420: [SelectionDAG] Remove deprecated MemSDNode->getAlignment()

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 05:03:04 PST 2022


arichardson created this revision.
arichardson added reviewers: aeubanks, gchatelet.
Herald added subscribers: kosarev, foad, ecnelises, kerbowa, pengfei, dmgreen, atanasyan, jrtc27, kbarton, hiraditya, jvesely, nemanjai, sdardis, arsenm.
Herald added a project: All.
arichardson requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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 <https://reviews.llvm.org/rGdf84c1fe78130a86445d57563dea742e1b85156a>, 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().


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138420

Files:
  llvm/include/llvm/CodeGen/SelectionDAGNodes.h
  llvm/include/llvm/Target/TargetSelectionDAG.td
  llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
  llvm/lib/Target/AMDGPU/SIInstrInfo.td
  llvm/lib/Target/ARM/ARMInstrMVE.td
  llvm/lib/Target/ARM/ARMInstrNEON.td
  llvm/lib/Target/ARM/ARMInstrVFP.td
  llvm/lib/Target/M68k/M68kInstrInfo.td
  llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp
  llvm/lib/Target/PowerPC/PPCInstrInfo.td
  llvm/lib/Target/X86/X86InstrFragmentsSIMD.td
  llvm/lib/Target/X86/X86InstrInfo.td
  llvm/test/CodeGen/Mips/load-max-alignment.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138420.476864.patch
Type: text/x-patch
Size: 22344 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221121/8329e835/attachment.bin>


More information about the llvm-commits mailing list