[PATCH] D82876: [Alignment][NFC] Migrate TargetTransformInfo::allowsMisalignedMemoryAccesses to Align
Guillaume Chatelet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 30 07:34:11 PDT 2020
gchatelet marked 2 inline comments as done.
gchatelet added inline comments.
Herald added a subscriber: wuzish.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:898
TLI.allowsMisalignedMemoryAccesses(
- VT, DstAS, Op.isFixedDstAlign() ? Op.getDstAlign().value() : 0,
+ VT, DstAS, Op.isFixedDstAlign() ? Op.getDstAlign() : Align(1),
MachineMemOperand::MONone, &Fast) &&
----------------
[`allowsMisalignedMemoryAccesses`](https://github.com/llvm/llvm-project/blob/70f6389257a85a8fa7f128a05a1ccbd0dbba191c/llvm/include/llvm/CodeGen/TargetLowering.h#L1576) can only consider valid alignment. `0` here is not a valid value, that's why it is turned into a `1`.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:252
allowsMisalignedMemoryAccesses(
- VT, DstAS, Op.isFixedDstAlign() ? Op.getDstAlign().value() : 0,
+ VT, DstAS, Op.isFixedDstAlign() ? Op.getDstAlign() : Align(1),
MachineMemOperand::MONone, &Fast) &&
----------------
ditto
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82876/new/
https://reviews.llvm.org/D82876
More information about the llvm-commits
mailing list