It looks like after this went in which is included with 10 that this local diff can be removed..
https://reviews.llvm.org/D71954 [PowerPC] Change default for unaligned FP access for older subtargets This is a fix for https://bugs.llvm.org/show_bug.cgi?id=40554 Some CPU's trap to the kernel on unaligned floating point access and there are kernels that do not handle the interrupt. The program then fails with a SIGBUS according to the PR. This just switches the default for unaligned access to only allow it on recent server CPUs that are known to allow this. Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp =================================================================== RCS file: /home/cvs/src/gnu/llvm/llvm/lib/Target/PowerPC/PPCISelLowering.cpp,v retrieving revision 1.1.1.2 diff -u -p -u -p -r1.1.1.2 PPCISelLowering.cpp --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp 9 Aug 2020 15:50:15 -0000 1.1.1.2 +++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp 11 Aug 2020 07:39:07 -0000 @@ -15299,14 +15299,6 @@ bool PPCTargetLowering::allowsMisaligned if (VT == MVT::ppcf128) return false; - if (Subtarget.isTargetOpenBSD()) { - // Traditional PowerPC does not support unaligned memory access - // for floating-point and the OpenBSD kernel does not emulate - // all possible floating-point load and store instructions. - if (VT == MVT::f32 || VT == MVT::f64) - return false; - } - if (Fast) *Fast = true; Index: llvm/lib/Target/PowerPC/PPCSubtarget.h =================================================================== RCS file: /home/cvs/src/gnu/llvm/llvm/lib/Target/PowerPC/PPCSubtarget.h,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 PPCSubtarget.h --- llvm/lib/Target/PowerPC/PPCSubtarget.h 3 Aug 2020 14:30:25 -0000 1.1.1.1 +++ llvm/lib/Target/PowerPC/PPCSubtarget.h 11 Aug 2020 07:38:26 -0000 @@ -320,7 +320,6 @@ public: bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); } bool isTargetMachO() const { return TargetTriple.isOSBinFormatMachO(); } bool isTargetLinux() const { return TargetTriple.isOSLinux(); } - bool isTargetOpenBSD() const { return TargetTriple.isOSOpenBSD(); } bool isDarwinABI() const { return isTargetMachO() || isDarwin(); } bool isAIXABI() const { return TargetTriple.isOSAIX(); }