Commit d7bf86f
committed
[TBAA] Only clear TBAAStruct if field can be extracted. (llvm#81285)
Retain TBAAStruct if we fail to match the access to a single field. All
users at the moment use this when using the full size of the original
access. SROA also retains the original TBAAStruct when accessing parts
at offset 0.
Motivation for this and follow-on patches is to improve codegen for
libc++, where using memcpy limits optimizations, like vectorization for
code iteration over std::vector<std::complex<float>>:
https://godbolt.org/z/f3vqYos3c
Depends on llvm#81284
(cherry-picked from 3b6e250)1 parent 268147a commit d7bf86f
File tree
2 files changed
+6
-4
lines changed- llvm
- lib/Analysis
- test/Transforms/InstCombine
2 files changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
822 | 822 | | |
823 | 823 | | |
824 | 824 | | |
825 | | - | |
826 | 825 | | |
827 | 826 | | |
828 | 827 | | |
829 | 828 | | |
830 | 829 | | |
831 | 830 | | |
832 | | - | |
| 831 | + | |
| 832 | + | |
833 | 833 | | |
| 834 | + | |
834 | 835 | | |
835 | 836 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
0 commit comments