[PATCH] D116581: [Aarch64] Customer lowering of COPYSIGN to SIMD should check for NEON availability
Akshay kumar S via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 4 00:31:50 PST 2022
akshaykumars614 created this revision.
akshaykumars614 added reviewers: RKSimon, david-arm, DavidTruby.
Herald added subscribers: hiraditya, kristof.beyls.
akshaykumars614 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
For the following test case, clang is crashing for ARM64 architecture
$ cat crash.c
double crash(double a, double b)
{
return __builtin_copysign(a, b);
}
$ clang -O2 -march=armv8-a+nosimd --target=arm64 -S crash.c -o /dev/null
fatal error: error in backend: Cannot select: 0x7fae361bb4e8: v2i64 = AArch64ISD::BIT 0x7fae361bb210, 0x7fae361bb278, 0x7fae361bb480
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116581
Files:
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Index: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -7256,6 +7256,9 @@
return getSVESafeBitCast(VT, IntResult, DAG);
}
+ if (!Subtarget->hasNEON())
+ return SDValue();
+
if (SrcVT.bitsLT(VT))
In2 = DAG.getNode(ISD::FP_EXTEND, DL, VT, In2);
else if (SrcVT.bitsGT(VT))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116581.397214.patch
Type: text/x-patch
Size: 471 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220104/8beea014/attachment.bin>
More information about the llvm-commits
mailing list