diff options
author | Quentin Colombet <qcolombet@apple.com> | 2014-02-06 21:44:56 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2014-02-06 21:44:56 +0000 |
commit | 30c0f722370210d746c3bf4c3104952b78e5e498 (patch) | |
tree | 1e16d6e8ff598e64189290a3887f1aba723f4133 /test/TestRunner.sh | |
parent | 2be0fae98c54ff6b0e7a53ee1d01b5a402eaa51e (diff) | |
download | llvm-30c0f722370210d746c3bf4c3104952b78e5e498.tar.gz llvm-30c0f722370210d746c3bf4c3104952b78e5e498.tar.bz2 llvm-30c0f722370210d746c3bf4c3104952b78e5e498.tar.xz |
[CodeGenPrepare] Move away sign extensions that get in the way of addressing
mode.
Basically the idea is to transform code like this:
%idx = add nsw i32 %a, 1
%sextidx = sext i32 %idx to i64
%gep = gep i8* %myArray, i64 %sextidx
load i8* %gep
Into:
%sexta = sext i32 %a to i64
%idx = add nsw i64 %sexta, 1
%gep = gep i8* %myArray, i64 %idx
load i8* %gep
That way the computation can be folded into the addressing mode.
This transformation is done as part of the addressing mode matcher.
If the matching fails (not profitable, addressing mode not legal, etc.), the
matcher will revert the related promotions.
<rdar://problem/15519855>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200947 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/TestRunner.sh')
0 files changed, 0 insertions, 0 deletions