diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-11-20 06:15:56 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-11-20 06:15:56 +0000 |
commit | 43f41cc550e74346f927dc45cb82c57ddcf07117 (patch) | |
tree | 6d709abfcc8d887395cf3aff6d829337a3764020 /test | |
parent | d20d4e58d91ce99a78b71af070bee327896b2366 (diff) | |
download | external_llvm-43f41cc550e74346f927dc45cb82c57ddcf07117.zip external_llvm-43f41cc550e74346f927dc45cb82c57ddcf07117.tar.gz external_llvm-43f41cc550e74346f927dc45cb82c57ddcf07117.tar.bz2 |
Merging r195118:
------------------------------------------------------------------------
r195118 | chandlerc | 2013-11-19 01:03:18 -0800 (Tue, 19 Nov 2013) | 22 lines
Fix an issue where SROA computed different results based on the relative
order of slices of the alloca which have exactly the same size and other
properties. This was found by a perniciously unstable sort
implementation used to flush out buggy uses of the algorithm.
The fundamental idea is that findCommonType should return the best
common type it can find across all of the slices in the range. There
were two bugs here previously:
1) We would accept an integer type smaller than a byte-width multiple,
and if there were different bit-width integer types, we would accept
the first one. This caused an actual failure in the testcase updated
here when the sort order changed.
2) If we found a bad combination of types or a non-load, non-store use
before an integer typed load or store we would bail, but if we found
the integere typed load or store, we would use it. The correct
behavior is to always use an integer typed operation which covers the
partition if one exists.
While a clever debugging sort algorithm found problem #1 in our existing
test cases, I have no useful test case ideas for #2. I spotted in by
inspection when looking at this code.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195217 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/SROA/basictest.ll | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/test/Transforms/SROA/basictest.ll b/test/Transforms/SROA/basictest.ll index 458b0df..5d3e4b5 100644 --- a/test/Transforms/SROA/basictest.ll +++ b/test/Transforms/SROA/basictest.ll @@ -1181,7 +1181,6 @@ entry: store i1 %x, i1* %b.i1, align 8 %b.i8 = bitcast <{ i1 }>* %b to i8* %foo = load i8* %b.i8, align 1 -; CHECK-NEXT: {{.*}} = zext i1 %x to i8 ; CHECK-NEXT: %[[ext:.*]] = zext i1 %x to i8 ; CHECK-NEXT: store i8 %[[ext]], i8* %[[a]], align 8 ; CHECK-NEXT: {{.*}} = load i8* %[[a]], align 8 |