Commit 624b2e4
committed
[Intrinsics] Add @llvm.dereferenceable intrinsic.
This patch adds a @llvm.dereferenceable intrinsic that can be used to
mark pointers as dereferenceable at the point the intrinsic is called.
The semantics match the meaning of the dereferenceable function
argument attribute.
The goal of the intrinsic is the preserve dereferenceability information
after moving memory instructions. This allows us to vectorize cases
such as https://clang.godbolt.org/z/Y1bedbhs3, where we currently fail
due to instcombine sinking the load into then/else blocks.
Alternatively we could use an assume bundle with a dereferenceable
attribute. But as a follow-up I would like to allow non-immediate size
arguments, and this may not mesh well with the attribute.1 parent 811f2a6 commit 624b2e4
File tree
5 files changed
+71
-0
lines changed- llvm
- docs
- include/llvm/IR
- lib/CodeGen/SelectionDAG
- test
- CodeGen/AArch64
- Verifier
5 files changed
+71
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29153 | 29153 | | |
29154 | 29154 | | |
29155 | 29155 | | |
| 29156 | + | |
| 29157 | + | |
| 29158 | + | |
| 29159 | + | |
| 29160 | + | |
| 29161 | + | |
| 29162 | + | |
| 29163 | + | |
| 29164 | + | |
| 29165 | + | |
| 29166 | + | |
| 29167 | + | |
| 29168 | + | |
| 29169 | + | |
| 29170 | + | |
| 29171 | + | |
| 29172 | + | |
| 29173 | + | |
| 29174 | + | |
| 29175 | + | |
| 29176 | + | |
| 29177 | + | |
| 29178 | + | |
| 29179 | + | |
| 29180 | + | |
| 29181 | + | |
| 29182 | + | |
| 29183 | + | |
| 29184 | + | |
| 29185 | + | |
| 29186 | + | |
| 29187 | + | |
| 29188 | + | |
| 29189 | + | |
| 29190 | + | |
| 29191 | + | |
| 29192 | + | |
| 29193 | + | |
| 29194 | + | |
29156 | 29195 | | |
29157 | 29196 | | |
29158 | 29197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
957 | 961 | | |
958 | 962 | | |
959 | 963 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8293 | 8293 | | |
8294 | 8294 | | |
8295 | 8295 | | |
| 8296 | + | |
| 8297 | + | |
| 8298 | + | |
8296 | 8299 | | |
8297 | 8300 | | |
8298 | 8301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments