diff options
author | Nemanja Ivanovic <nemanja.i.ibm@gmail.com> | 2020-05-26 09:58:25 -0500 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2020-06-23 13:57:14 -0700 |
commit | 177a9ac3c6bcb89ca2f900e20caad92fdeabe9d2 (patch) | |
tree | aaa5c93304a7ab605b87af7c54f2eee7063042e6 /llvm/lib/Target | |
parent | 8f299fd2cff7d99c1aacf602ee50e96ded59d706 (diff) | |
download | bcm5719-llvm-177a9ac3c6bcb89ca2f900e20caad92fdeabe9d2.tar.gz bcm5719-llvm-177a9ac3c6bcb89ca2f900e20caad92fdeabe9d2.zip |
[PowerPC] Unaligned FP default should apply to scalars only
As reported in PR45186, we could be in a situation where we don't
want to handle unaligned memory accesses for FP scalars but still
have VSX (which allows unaligned access for vectors). Change the
default to only apply to scalars.
Fixes: https://bugs.llvm.org/show_bug.cgi?id=45186
(cherry picked from commit 099a875f28d0131a6ae85af91b9eb8627917fbbe)
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index cdefb38ec0a..ca1649fae25 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -15279,7 +15279,8 @@ bool PPCTargetLowering::allowsMisalignedMemoryAccesses(EVT VT, if (!VT.isSimple()) return false; - if (VT.isFloatingPoint() && !Subtarget.allowsUnalignedFPAccess()) + if (VT.isFloatingPoint() && !VT.isVector() && + !Subtarget.allowsUnalignedFPAccess()) return false; if (VT.getSimpleVT().isVector()) { |