]> granicus.if.org Git - llvm/commit
[DAGCombiner] Don't create illegal narrow stores
authorJames Molloy <jmolloy@google.com>
Sat, 31 Aug 2019 10:46:16 +0000 (10:46 +0000)
committerJames Molloy <jmolloy@google.com>
Sat, 31 Aug 2019 10:46:16 +0000 (10:46 +0000)
commit8c987dadef7963ef4a0bcac42fa8ce47c6dc9289
treed18b09e78afd03866d101863780b7698490abf62
parentf8c6af04e20e268c50518f378b72b67c6cc0b08a
[DAGCombiner] Don't create illegal narrow stores

Narrowing stores when the target doesn't support the narrow version
forces the target to expand into a load-modify-store sequence, which
is highly suboptimal. The information narrowing throws away (legality
of the inverse transform) is hard to re-analyze. If the target doesn't
support a store of the narrow type, don't narrow even in pre-legalize
mode.

No test as this is DAGCombiner and depends on target bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370576 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp