[llvm] [GlobalISel][AArch64] Legalize G_FABS and G_FNEG for SVE (PR #114784)

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 10:00:56 PST 2024


================
@@ -0,0 +1,71 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
+; RUN: llc < %s -mtriple aarch64 -mattr=+sve  | FileCheck %s
+; RUN: llc < %s -mtriple aarch64 -mattr=+sve -global-isel -aarch64-enable-gisel-sve=1 | FileCheck %s
+
+;; fneg
+define <vscale x 2 x double> @fnegnxv2double(<vscale x 2 x double> %a) {
+; CHECK-LABEL: fnegnxv2double:
+; CHECK:       // %bb.0: // %entry
+; CHECK-NEXT:    ptrue p0.d
+; CHECK-NEXT:    fneg z0.d, p0/m, z0.d
+; CHECK-NEXT:    ret
+entry:
+  %c = fneg <vscale x 2 x double> %a
+  ret <vscale x 2 x double> %c
+}
+
----------------
tschuett wrote:

LLVM ERROR: Unable to widen vector store
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: llc -mtriple aarch64 -mattr=+sve -global-isel=0
1.	Running pass 'Function Pass Manager' on module '<stdin>'.
2.	Running pass 'AArch64 Instruction Selection' on function '@fnegnxv3double'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  llc                      0x000000010c171388 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 40
1  llc                      0x000000010c16eadb llvm::sys::RunSignalHandlers() + 235
2  llc                      0x000000010c171b56 SignalHandler(int) + 278
3  libsystem_platform.dylib 0x00007ff8161aee9d _sigtramp + 29
4  libsystem_platform.dylib 000000000000000000 _sigtramp + 18446603370210070912
5  libsystem_c.dylib        0x00007ff81609ab19 abort + 126
6  llc                      0x000000010c0b06aa llvm::report_fatal_error(llvm::Twine const&, bool) + 458
7  llc                      0x000000010c0b04d9 llvm::report_fatal_error(char const*, bool) + 41
8  llc                      0x000000010be82561 llvm::DAGTypeLegalizer::WidenVecOp_STORE(llvm::SDNode*) + 6465
9  llc                      0x000000010be7e159 llvm::DAGTypeLegalizer::WidenVectorOperand(llvm::SDNode*, unsigned int) + 3145
10 llc                      0x000000010be1be87 llvm::SelectionDAG::LegalizeTypes() + 4039

https://github.com/llvm/llvm-project/pull/114784


More information about the llvm-commits mailing list