Commit 384770e
committed
[IR] Don't DCE llvm.ret.popless.
We originally had the intrinsic forward its return value to the ret to
have musttail-like behavior, which ensured it was always preserved.
Now that the intrinsic call is musttail but doesn't have any forwarded
operands, it needs to be kept alive through other means.
It might make sense to mark it as having side effects, and not
duplicable, but that shouldn't be necessary, and it's as duplicable
as any musttail call+ret sequence would be.
Because of this, we can't rely on it being DCE'd in ISel either, so drop
it explicitly in IRTranslator for GISel. We already had to do it in
SDISel anyway. While there, explicitly reject it in FastISel.
rdar://1472362551 parent 52307ab commit 384770e
File tree
6 files changed
+27
-3
lines changed- llvm
- include/llvm/IR
- lib
- CodeGen
- GlobalISel
- SelectionDAG
- Target/AArch64
- test
- CodeGen/AArch64
- Transforms/DCE
6 files changed
+27
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
850 | 850 | | |
851 | 851 | | |
852 | 852 | | |
853 | | - | |
| 853 | + | |
854 | 854 | | |
855 | 855 | | |
856 | 856 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2393 | 2393 | | |
2394 | 2394 | | |
2395 | 2395 | | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
2396 | 2403 | | |
2397 | 2404 | | |
2398 | 2405 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7958 | 7958 | | |
7959 | 7959 | | |
7960 | 7960 | | |
7961 | | - | |
| 7961 | + | |
| 7962 | + | |
| 7963 | + | |
| 7964 | + | |
7962 | 7965 | | |
7963 | 7966 | | |
7964 | 7967 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3867 | 3867 | | |
3868 | 3868 | | |
3869 | 3869 | | |
| 3870 | + | |
| 3871 | + | |
| 3872 | + | |
3870 | 3873 | | |
3871 | 3874 | | |
3872 | 3875 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments