https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70814
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Target| |aarch64
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-04-27
CC| |ktkachov at gcc dot gnu.org
Ever confirmed|0 |1
Severity|normal |enhancement
--- Comment #1 from ktkachov at gcc dot gnu.org ---
Confirmed.
For reference, the testcase is:
#include <atomic>
#include <stdint.h>
std::atomic<__int128> a;
__attribute__((noinline)) void f(int64_t v)
{
a.store(v);
}
int main()
{
f(1);
return 0;
}
g++ at -O2 for aarch64 emits for the function 'f':
_Z1fl:
.LFB328:
.cfi_startproc
mov x2, x0
adrp x1, .LANCHOR0
add x0, x1, :lo12:.LANCHOR0
mov w4, 5
asr x3, x2, 63
b __atomic_store_16