summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM64
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2014-04-12 00:59:48 +0000
committerHal Finkel <hfinkel@anl.gov>2014-04-12 00:59:48 +0000
commit24517d023ff353515817ea2107d6eb0d57017bbd (patch)
tree6080b9333ec6da50da5723b15192c402dd46d067 /test/CodeGen/ARM64
parenta5b2772d31e22e3402dea9cbd721417717261f91 (diff)
downloadllvm-24517d023ff353515817ea2107d6eb0d57017bbd.tar.gz
llvm-24517d023ff353515817ea2107d6eb0d57017bbd.tar.bz2
llvm-24517d023ff353515817ea2107d6eb0d57017bbd.tar.xz
Add the ability to use GEPs for address sinking in CGP
The current memory-instruction optimization logic in CGP, which sinks parts of the address computation that can be adsorbed by the addressing mode, does this by explicitly converting the relevant part of the address computation into IR-level integer operations (making use of ptrtoint and inttoptr). For most targets this is currently not a problem, but for targets wishing to make use of IR-level aliasing analysis during CodeGen, the use of ptrtoint/inttoptr is a problem for two reasons: 1. BasicAA becomes less powerful in the face of the ptrtoint/inttoptr 2. In cases where type-punning was used, and BasicAA was used to override TBAA, BasicAA may no longer do so. (this had forced us to disable all use of TBAA in CodeGen; something which we can now enable again) This (use of GEPs instead of ptrtoint/inttoptr) is not currently enabled by default (except for those targets that use AA during CodeGen), and so aside from some PowerPC subtargets and SystemZ, there should be no change in behavior. We may be able to switch completely away from the ptrtoint/inttoptr sinking on all targets, but further testing is required. I've doubled-up on a number of existing tests that are sensitive to the address sinking behavior (including some store-merging tests that are sensitive to the order of the resulting ADD operations at the SDAG level). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206092 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM64')
-rw-r--r--test/CodeGen/ARM64/dagcombiner-indexed-load.ll1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/CodeGen/ARM64/dagcombiner-indexed-load.ll b/test/CodeGen/ARM64/dagcombiner-indexed-load.ll
index 6cea039ad8..2e4b658f1c 100644
--- a/test/CodeGen/ARM64/dagcombiner-indexed-load.ll
+++ b/test/CodeGen/ARM64/dagcombiner-indexed-load.ll
@@ -1,4 +1,5 @@
; RUN: llc -O3 < %s | FileCheck %s
+; RUN: llc -O3 -addr-sink-using-gep=1 < %s | FileCheck %s
; Test case for a DAG combiner bug where we combined an indexed load
; with an extension (sext, zext, or any) into a regular extended load,
; i.e., dropping the indexed value.