Commit 3b6e250
authored
[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#812841 parent 92ef408 commit 3b6e250
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 | |
|---|---|---|---|
| |||
821 | 821 | | |
822 | 822 | | |
823 | 823 | | |
824 | | - | |
825 | 824 | | |
826 | 825 | | |
827 | 826 | | |
828 | 827 | | |
829 | 828 | | |
830 | 829 | | |
831 | | - | |
| 830 | + | |
| 831 | + | |
832 | 832 | | |
| 833 | + | |
833 | 834 | | |
834 | 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