[PATCH] D133199: [ARM] Constant pools need 4-byte alignment if we only have tADR

John Brawn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 2 05:35:19 PDT 2022


john.brawn created this revision.
john.brawn added reviewers: dcandler, gsocshubham, labrinea.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
john.brawn requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When the only ADR instruction we have is the 16-bit thumb one then all constant pool entries need to be 4-byte aligned, as tADR has an offset that's a multiple of 4.

It looks like previously there happened to be no situations in which we encountered a constant pool entry with alignment less than 4, so failing to do this didn't cause any problems, but the expansion of cttz to a table does use a constant pool with alignment 1, so we now need to handle it correctly.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133199

Files:
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/test/CodeGen/ARM/cttz.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133199.457564.patch
Type: text/x-patch
Size: 30744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220902/3eafdd8a/attachment.bin>


More information about the llvm-commits mailing list