[PowerPC] Change default for unaligned FP access for older subtargets
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Sat, 28 Dec 2019 17:20:36 +0000 (11:20 -0600)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Sat, 28 Dec 2019 17:20:52 +0000 (11:20 -0600)
commita9ad65a2b34f9cbcd207114caa862ef2dc4553c8
tree5d3be0d1f9d8c9e7fa34c08abbadefa71624a76c
parent34769e0783586c0502567785656ef3c60ef08395
[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.

Differential revision: https://reviews.llvm.org/D71954
llvm/lib/Target/PowerPC/PPC.td
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCSubtarget.h
llvm/test/CodeGen/PowerPC/2007-09-08-unaligned.ll
llvm/test/CodeGen/PowerPC/unaligned-floats.ll [new file with mode: 0644]