[DAG] TransformFPLoadStorePair - replace getABITypeAlign with allowsMemoryAccess...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 24 Aug 2021 12:11:27 +0000 (13:11 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 24 Aug 2021 12:11:27 +0000 (13:11 +0100)
commit6de0b551884f2af3da6cb77cca5532b05c0c2192
treeb11891b912098735bc466b5daf2547f539515f64
parente431b280c9aedfd405ec248fbb934bd88863dd2c
[DAG] TransformFPLoadStorePair - replace getABITypeAlign with allowsMemoryAccess (PR45116)

One of the cases identified in PR45116 - we don't need to limit load combines (in this case for fp->int load/store copies) to ABI alignment, we can use allowsMemoryAccess - which tests using getABITypeAlign, but also checks if a target permits (fast) misaligned memory loads by checking allowsMisalignedMemoryAccesses as a fallback.

Differential Revision: https://reviews.llvm.org/D108318
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/PowerPC/2007-09-08-unaligned.ll
llvm/test/CodeGen/PowerPC/unaligned.ll