Skip to content

Cannot select: 0xe87fb38: i32,ch = AtomicLoadMax #41760

@xiangzhai

Description

@xiangzhai
Bugzilla Link 42415
Version 8.0
OS Linux
Attachments [https://user-images.githubusercontent.com/851100/143759397-c6ce0a49-1346-480e-b14c-3b01903281d4.gz), [https://user-images.githubusercontent.com/851100/143759398-c0cb1be9-536d-45d7-87f6-bf75f1e79e3d.gz)
CC @atanasyan

Extended Description

Hi,

$ clang++ -S -c llvm-project/clang/test/CodeGen/Atomics.c -o Atomics.S
clang-8: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
llvm-project/clang/test/CodeGen/Atomics.c:52:39: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
(void) __sync_fetch_and_nand (&sc, 1); // CHECK: atomicrmw nand i8
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:53:39: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
(void) __sync_fetch_and_nand (&uc, 1); // CHECK: atomicrmw nand i8
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:54:39: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
(void) __sync_fetch_and_nand (&ss, 1); // CHECK: atomicrmw nand i16
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:55:39: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
(void) __sync_fetch_and_nand (&us, 1); // CHECK: atomicrmw nand i16
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:56:39: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
(void) __sync_fetch_and_nand (&si, 1); // CHECK: atomicrmw nand i32
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:57:39: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
(void) __sync_fetch_and_nand (&ui, 1); // CHECK: atomicrmw nand i32
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:58:40: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
(void) __sync_fetch_and_nand (&sll, 1); // CHECK: atomicrmw nand i64
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:59:40: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
(void) __sync_fetch_and_nand (&ull, 1); // CHECK: atomicrmw nand i64
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:110:38: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
sc = __sync_fetch_and_nand (&sc, 11); // CHECK: atomicrmw nand
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:111:38: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
uc = __sync_fetch_and_nand (&uc, 11); // CHECK: atomicrmw nand
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:112:38: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
ss = __sync_fetch_and_nand (&ss, 11); // CHECK: atomicrmw nand
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:113:38: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
us = __sync_fetch_and_nand (&us, 11); // CHECK: atomicrmw nand
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:114:38: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
si = __sync_fetch_and_nand (&si, 11); // CHECK: atomicrmw nand
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:115:38: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
ui = __sync_fetch_and_nand (&ui, 11); // CHECK: atomicrmw nand
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:116:40: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
sll = __sync_fetch_and_nand (&sll, 11); // CHECK: atomicrmw nand
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:117:40: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:168:38: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
sc = __sync_nand_and_fetch (&sc, uc); // CHECK: atomicrmw nand
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:171:38: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
uc = __sync_nand_and_fetch (&uc, uc); // CHECK: atomicrmw nand
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:174:38: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
ss = __sync_nand_and_fetch (&ss, uc); // CHECK: atomicrmw nand
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:177:38: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
us = __sync_nand_and_fetch (&us, uc); // CHECK: atomicrmw nand
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:180:38: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
si = __sync_nand_and_fetch (&si, uc); // CHECK: atomicrmw nand
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:183:38: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
ui = __sync_nand_and_fetch (&ui, uc); // CHECK: atomicrmw nand
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:186:40: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
sll = __sync_nand_and_fetch (&sll, uc); // CHECK: atomicrmw nand
~~~~~~~~~~~~~~~~~~~~~ ^
llvm-project/clang/test/CodeGen/Atomics.c:189:40: warning: the semantics of this intrinsic changed with GCC version 4.4 - the
newer semantics are provided here [-Wsync-fetch-and-nand-semantics-changed]
ull = __sync_nand_and_fetch (&ull, uc); // CHECK: atomicrmw nand
~~~~~~~~~~~~~~~~~~~~~ ^
fatal error: error in backend: Cannot select: 0xe87fb38: i32,ch = AtomicLoadMax<(volatile load store monotonic 4 on @​si)>
0xe882f88, 0xe8d3b08, 0xe880970
0xe8d3b08: i64,ch = load<(load 8 from got)> 0xe820da8, 0xe8a0b58, undef:i64
0xe8a0b58: i64 = MipsISD::Wrapper Register:i64 %0, TargetGlobalAddress:i64<i32* @​si> 0 [TF=15]
0xe8805c8: i64 = Register %0
0xe8d40b8: i64 = TargetGlobalAddress<i32* @​si> 0 [TF=15]
0xe8d0dc0: i64 = undef
0xe880970: i32,ch = load<(dereferenceable load 4 from %ir.7)> 0xe8d3f18, FrameIndex:i64<6>, undef:i64
0xe882eb8: i64 = FrameIndex<6>
0xe8d0dc0: i64 = undef
In function: _Z11test_atomicv
clang-8: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 8.0.0
Target: mips64el-redhat-linux
Thread model: posix
InstalledDir: /usr/bin
clang-8: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
clang-8: note: diagnostic msg:


PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-8: note: diagnostic msg: /tmp/Atomics-bafc90.c
clang-8: note: diagnostic msg: /tmp/Atomics-bafc90.sh
clang-8: note: diagnostic msg:


Thanks,
Leslie Zhai

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions