[PATCH] D35007: [PowerPC] Do not emit displacements for DQ-Form instructions that aren't multiples of 16

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 5 07:36:04 PDT 2017


hfinkel added inline comments.


================
Comment at: lib/Target/PowerPC/PPCInstrInfo.td:408
+// instructions).
+def aligned16load : PatFrag<(ops node:$ptr), (load node:$ptr), [{
+  return isOffsetMultipleOf(N, 16);
----------------
nemanjai wrote:
> If this solution is the way we want to proceed, perhaps it would be good to use the same approach for DS-Form instructions. These ultimately don't need to be aligned, they just can't have a displacement that isn't a multiple of 4.
Why can't we just check `cast<LoadSDNode>(N)->getAlignment() >= 16;` like we do above?


Repository:
  rL LLVM

https://reviews.llvm.org/D35007





More information about the llvm-commits mailing list