[llvm-bugs] [Bug 41619] New: r358887 causes fatal error: error in backend: Cannot emit physreg copy instruction
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Apr 26 14:47:57 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41619
Bug ID: 41619
Summary: r358887 causes fatal error: error in backend: Cannot
emit physreg copy instruction
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: rtrieu at google.com
CC: llvm-bugs at lists.llvm.org, llvm-dev at redking.me.uk
$ cat test.ii
using Vec = float __attribute__((__vector_size__(16)));
Vec getVector();
Vec makeVector(float f) {
float g;
return {g, f, f};
}
struct A {
union {
Vec v;
float arr[4];
};
A() : v(getVector()) {}
A(Vec k) : v(k) {}
};
struct B : A {
B() {}
B(float f) : A(makeVector(f)) {}
float &operator[](int i) { return arr[i]; }
};
struct C {
B d[2];
C() {}
C(B b0, B b1) : d{b0, b1} {}
B &operator[](int i) { return d[i]; }
void Bar(C);
C calculate() {
C ret;
for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
ret[i][j] = d[j][i];
return ret;
}
};
void run(B b) {
C c1 = C(B(), B(b[0]));
C c2 = c1.calculate();
c2.Bar(c1);
}
$ clang -mavx2 -O2 test.ii
fatal error: error in backend: Cannot emit physreg copy instruction
clang-9: error: clang frontend command failed with exit code 70
$ clang -mavx2 -O2 test.ii -v
"/usr/local/bin/clang-9" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj
-disable-free -disable-llvm-verifier -discard-value-names -main-file-name
test.ii -mrelocation-model static -mthread-model posix -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -target-feature +avx2 -dwarf-column-info
-debugger-tuning=gdb -momit-leaf-frame-pointer -v -resource-dir
/usr/local/lib/clang/9.0.0 -O2 -fdeprecated-macro -fdebug-compilation-dir
/usr/local/crash -ferror-limit 19 -fmessage-length 80 -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics
-vectorize-loops -vectorize-slp -o /tmp/test-4ae44d.o -x c++-cpp-output test.ii
-faddrsig
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190426/3547363b/attachment.html>
More information about the llvm-bugs
mailing list