| Issue |
180118
|
| Summary |
[Flang][AArch64][Regression] Frame pointer register (x29) not emitted in LLVM 22.1.0-rc1
|
| Labels |
flang
|
| Assignees |
|
| Reporter |
makatsuka
|
```
Version of flang : 22.1.0-rc1
```
When using Flang 22.1.0-rc1 on AArch64, the generated assembly does not emit the frame pointer register (x29) under any of the following conditions:
- no option specified
- -fno-omit-frame-pointer
- -fomit-frame-pointer
In the previous release (LLVM 21.1.0), both the default behavior and the use of -fno-omit-frame-pointer correctly emitted the frame pointer.
Therefore, the behavior in 22.1.0-rc1 differs from the previous release and appears to be a regression.
Below is the test program and the compilation results using LLVM 21.1.0 and LLVM 22.1.0-rc1.
frame-pointer.f90:
```
program main
print *, "test"
end program main
```
LLVM 21.1.0:
```
$ flang frame-pointer.f90 -target aarch64-linux-gnu -S -o - | grep x29 | head -1
stp x29, x30, [sp, #16]
$ flang frame-pointer.f90 -target aarch64-linux-gnu -fno-omit-frame-pointer -S -o - | grep x29 | head -1
stp x29, x30, [sp, #16]
$ flang frame-pointer.f90 -target aarch64-linux-gnu -fomit-frame-pointer -S -o - | grep x29 | head -1
```
LLVM 22.1.0-rc1:
```
$ flang frame-pointer.f90 -target aarch64-linux-gnu -S -o - | grep x29 | head -1
$ flang frame-pointer.f90 -target aarch64-linux-gnu -fno-omit-frame-pointer -S -o - | grep x29 | head -1
$ flang frame-pointer.f90 -target aarch64-linux-gnu -fomit-frame-pointer -S -o - | grep x29 | head -1
```
In 22.1.0-rc1, all outputs are empty, indicating that the frame pointer register (x29) is not emitted in any of the tested cases.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs