-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ARM] musttail attribute fails with LTO and mismatched -ffast-math options #109929
Comments
@llvm/issue-subscribers-backend-arm Author: Oliver Stannard (ostannard)
This code causes an error in the ARM backend when built with LTO, and one part is build with -ffast-math, and the other with UBSan:
```c
struct function_pointers {
double (*F95)(void);
};
void init_0(struct function_pointers *p); double F93(void); #ifdef PART1 [[clang::noinline]] double F90(void) { double F95(void) { return 0.0; } signed int main(void) { return 0; #ifdef PART2 void init_0(struct function_pointers *p) { fptrs = p; } double F93(void) {
I think what's causing this to fail is that, going into the backend,
|
This code causes an error in the ARM backend when built with LTO, and one part is build with -ffast-math, and the other with UBSan:
#!/bin/bash -xe /work/llvm/install/bin/clang --target=arm-none-eabi -march=armv7-a -c test.c -o part1.bc -O1 -flto -DPART1 -ffast-math /work/llvm/install/bin/clang --target=arm-none-eabi -march=armv7-a -c test.c -o part2.bc -O1 -flto -DPART2 -fsanitize=undefined -fsanitize-trap=undefined /work/llvm/install/bin/llvm-lto2 run part1.bc part2.bc -o test.o \ -r part1.bc,F90,pl \ -r part1.bc,F93,l \ -r part1.bc,F95,pl \ -r part1.bc,main,px \ -r part1.bc,init_0,l \ -r part1.bc,actual_fptrs,pl \ -r part2.bc,init_0,pl \ -r part2.bc,F93,pl
I think what's causing this to fail is that, going into the backend,
@F90
has anofpclass(nan inf)
attribute on its return value, but has amusttail
call without that attribute. Removing the attribute from@F90
or adding it to the call site causes the compile to succeed.The text was updated successfully, but these errors were encountered: