Issue 164134
Summary clang issues useless guard variable for static const value
Labels clang
Assignees
Reporter Matheus28
    Please see https://godbolt.org/z/K6bM5qfx3 and compare the gcc and clang output

The compiler is able to calculate the `pow` results at compile time, however it still issues a __cxa_guard_acquire/__cxa_guard_release pair just to move those values around in memory. Meanwhile, gcc is able to use the .rodata section directly.

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to