Commit 99cf032
committed
[TBAA] Only clear TBAAStruct if field can be extracted.
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 #812841 parent e6de9f2 commit 99cf032
File tree
2 files changed
+8
-5
lines changed- llvm
- lib/Analysis
- test/Transforms/InstCombine
2 files changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
821 | 821 | | |
822 | 822 | | |
823 | 823 | | |
824 | | - | |
825 | 824 | | |
826 | 825 | | |
827 | 826 | | |
828 | 827 | | |
829 | | - | |
830 | | - | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
831 | 832 | | |
| 833 | + | |
832 | 834 | | |
833 | 835 | | |
| 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