https://bugs.llvm.org/show_bug.cgi?id=50901
Bug ID: 50901
Summary: [power7] error in backend: Cannot select v16i8 =
PPCISD::SCALAR_TO_VECTOR_PERMUTED
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: PowerPC
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
With -mcpu=power7 at -O1 or higher, I'm seeing an error when attempting to
assign a dereferenced pointer to an 8-bit integer to a lane of a vector.
Reduced test case follows (or on Compiler Explorer at
https://godbolt.org/z/nsMG7cEqn):
typedef char int8_t;
typedef struct {
int8_t i8 __attribute__((__vector_size__(16)));
} simde_v128_private;
int simde_wasm_v128_load8_lane(void *a) {
int vec = 0, __trans_tmp_2, lane = 0;
simde_v128_private __trans_tmp_1;
{
int v = vec;
simde_v128_private r;
__builtin_memcpy(&r, &v, sizeof(r));
__trans_tmp_1 = r;
}
simde_v128_private a_ = __trans_tmp_1;
a_.i8[lane] = *(int8_t *)a;
simde_v128_private v = a_;
int r;
__builtin_memcpy(&r, &v, sizeof(r));
__trans_tmp_2 = r;
return r;
}
# clang --target=powerpc64le-linux-gnu -mcpu=power7 -O3 -s -o /dev/null test.c
clang-12: error: unknown argument: '-test.c'
clang-12: error: no input files
nemequ@peltast:~/t/creduce/load8_lane$ clang --target=powerpc64le-linux-gnu
-mcpu=power7 -O3 -s -o /dev/null test.c
fatal error: error in backend: Cannot select: 0x563404d58420: v16i8 =
PPCISD::SCALAR_TO_VECTOR_PERMUTED 0x563404d58078
0x563404d58078: i32,ch = load<(load 1 from %ir.0, !tbaa !2), anyext from i8>
0x563404cd4a48, 0x563404d57e08, undef:i64
0x563404d57e08: i64,ch = CopyFromReg 0x563404cd4a48, Register:i64 %0
0x563404d57da0: i64 = Register %0
0x563404d57ed8: i64 = undef
In function: simde_wasm_v128_load8_lane
clang-12: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 12.0.0 (Fedora 12.0.0-2.fc34)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-12: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/test-6e1589.c
clang-12: note: diagnostic msg: /tmp/test-6e1589.sh
clang-12: note: diagnostic msg:
********************
# clang --version
clang version 12.0.0 (Fedora 12.0.0-2.fc34)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Happens with clang 11, 12, and trunk.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs