Created attachment 23227 [details] reproduce files from manually crashing compiler with SIGBUS. FreeBSD clang 9.0.1 could compile this code OK, but FreeBSD clang 10.0.0 llvmorg-10.0.0-rc3-1-gc290cb61fdc gets stuck in an infinite loop, and so does current llvm master. Code is from FreeBSD security/nss package building on powerpc64.
The same bug affects also multimedia/x264.
Adding dim@ to cc.
Reduced to: // clang -cc1 -triple powerpc64-- -S -target-feature +vsx -O2 -std=c99 -vectorize-loops gcm-min.c struct { long b, c; } d; long e(unsigned char *f) { return (long)f[0] << 56 | (long)f[1] << 48 | (long)f[2] << 40 | (long)f[3] << 32 | (long)f[4] << 24 | f[5] << 16 | f[6] << 8 | f[7]; } void g(void) { d.c = e((unsigned char *)g + 8); d.b = e((unsigned char *)g); }
Regression caused by https://reviews.llvm.org/rGa9ad65a2b34 aka https://reviews.llvm.org/D71954 ("[PowerPC] Change default for unaligned FP access for older subtargets"), which was a fix for bug 40554.
Ah, this really was only supposed to be used for scalar types.
Is this something you need backported to 10.0.1?
(In reply to Nemanja Ivanovic from comment #6) > Is this something you need backported to 10.0.1? Yes, that would be nice, thanks for the fix!. I'm certainly going to import it into FreeBSD when the upcoming 10.0.1-rc2 drops. Or I'll cherry-pick it separately, so it can be merged back to older FreeBSD branches.
Can we get this merged into 10.0.1?
Sorry, that would mean that both commits need to be merged in: a9ad65a2b34f9cbcd207114caa862ef2dc4553c8 099a875f28d0131a6ae85af91b9eb8627917fbbe
(In reply to Nemanja Ivanovic from comment #9) > Sorry, that would mean that both commits need to be merged in: > a9ad65a2b34f9cbcd207114caa862ef2dc4553c8 This patch is from December and already in the branch. > 099a875f28d0131a6ae85af91b9eb8627917fbbe
Hal, what do you think about backporting this? https://reviews.llvm.org/rG099a875f28d0131a6ae85af91b9eb8627917fbbe
Reopened for merging.
(In reply to Tom Stellard from comment #11) > Hal, what do you think about backporting this? > > https://reviews.llvm.org/rG099a875f28d0131a6ae85af91b9eb8627917fbbe LGTM.
Merged: 177a9ac3c6b