OSDN Git Service

Enable splitting indexing from loads with TargetConstants
authorHal Finkel <hfinkel@anl.gov>
Tue, 2 Sep 2014 16:05:23 +0000 (16:05 +0000)
committerHal Finkel <hfinkel@anl.gov>
Tue, 2 Sep 2014 16:05:23 +0000 (16:05 +0000)
commit2633f795c69e0ccb32e2b9dbda60eae29c7fbea3
treefa16db8c8d764152a7fbc315453f496bf5f65e5b
parent1e556a80ffbc7c4ecb99848e14995119337c9362
Enable splitting indexing from loads with TargetConstants

When I recommitted r208640 (in r216898) I added an exclusion for TargetConstant
offsets, as there is no guarantee that a backend can handle them on generic
ADDs (even if it generates them during address-mode matching) -- and,
specifically, applying this transformation directly with TargetConstants caused
a self-hosting failure on PPC64. Ignoring all TargetConstants, however, is less
than ideal. Instead, for non-opaque constants, we can convert them into regular
constants for use with the generated ADD (or SUB).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216908 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/PowerPC/split-index-tc.ll [new file with mode: 0644]