[DAG] ReduceLoadOpStoreWidth - replace getABITypeAlign with allowsMemoryAccess (PR45116)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 25 Sep 2021 17:35:39 +0000 (18:35 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 25 Sep 2021 17:35:57 +0000 (18:35 +0100)
commit18c8ed54160bec12344288c6993b0f548fbe809e
tree007834995961832a35fb96e8871294f7318a1b41
parentc2ec5dd209532b1d618958ade6a7d550a0c31ea5
[DAG] ReduceLoadOpStoreWidth - replace getABITypeAlign with allowsMemoryAccess (PR45116)

One of the cases identified in PR45116 - we don't need to limit store narrowing to ABI alignment, we can use allowsMemoryAccess - which tests using getABITypeAlign, but also checks if a target permits (fast) misaligned memory access by checking allowsMisalignedMemoryAccesses as a fallback.
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/i1narrowfail.ll
llvm/test/CodeGen/X86/narrow_op-1.ll