Bug 214380 - net/freerdp: clang crashes during build on aarch64
Summary: net/freerdp: clang crashes during build on aarch64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: Dimitry Andric
URL:
Keywords: crash
Depends on:
Blocks: 201763
  Show dependency treegraph
 
Reported: 2016-11-10 07:51 UTC by Jan Beich
Modified: 2016-11-14 18:58 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (kevans)


Attachments
trio.c (preprocessed, XZ compressed) (85.31 KB, application/x-xz)
2016-11-10 07:51 UTC, Jan Beich
no flags Details
trio.sh (compiler args) (4.65 KB, text/plain)
2016-11-10 07:52 UTC, Jan Beich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2016-11-10 07:51:03 UTC
Created attachment 176845 [details]
trio.c (preprocessed, XZ compressed)

--- winpr/libwinpr/CMakeFiles/winpr.dir/utils/trio/trio.c.o ---
fatal error: error in backend: Cannot select: 0x4001521130: i32 = AArch64ISD::FCCMP 0x400147fab0, 0x4001598ab0, Constant:i32<0>, Constant:i32<13>, 0x400147f720
  0x400147fab0: f128,ch = CopyFromReg 0x400023f930, Register:f128 %vreg103
    0x4001b01850: f128 = Register %vreg103
  0x4001598ab0: f128,ch = CopyFromReg 0x400023f930, Register:f128 %vreg29
    0x40015b65f0: f128 = Register %vreg29
  0x40014c8130: i32 = Constant<0>
  0x400147f390: i32 = Constant<13>
  0x400147f720: f128 = AArch64ISD::FCMP 0x40014c9d10, 0x4001598ab0
    0x40014c9d10: f128,ch = CopyFromReg 0x400023f930, Register:f128 %vreg104
      0x40014d3850: f128 = Register %vreg104
    0x4001598ab0: f128,ch = CopyFromReg 0x400023f930, Register:f128 %vreg29
      0x40015b65f0: f128 = Register %vreg29
In function: TrioWriteDouble
cc: error: clang frontend command failed with exit code 70 (use -v to see invocation)
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
Target: aarch64-unknown-freebsd11.0
Thread model: posix
InstalledDir: /usr/bin

http://thunderx1.nyi.freebsd.org/data/110arm64-default/425457/logs/errors/freerdp-1.2.0_7.log
Comment 1 Jan Beich freebsd_committer 2016-11-10 07:52:19 UTC
Created attachment 176846 [details]
trio.sh (compiler args)
Comment 2 Jan Beich freebsd_committer 2016-11-10 07:58:01 UTC
Over to toolchain@ to determine whether it affects /head or just /releng/11.0. To reproduce you have to run trio.sh on aarch64: either qemu-user-static jail (via poudriere) or real hardware. For example:

  $ scp trio-de52a8.c.xz trio-de52a8.sh ref11-aarch64.freebsd.org:
  $ ssh ref11-aarch64.freebsd.org
  $ xz -d trio-de52a8.c.xz
  $ sh trio-de52a8.sh
Comment 3 commit-hook freebsd_committer 2016-11-10 19:40:40 UTC
A commit references this bug:

Author: dim
Date: Thu Nov 10 19:40:15 UTC 2016
New revision: 308487
URL: https://svnweb.freebsd.org/changeset/base/308487

Log:
  Pull in r263301 from upstream llvm trunk (by Ahmed Bougacha):

    [AArch64] Don't blindly lower f16/f128 FCCMPs.

    Instead, extend f16 (like we do when lowering a standalone SETCC),
    and let f128 be legalized to the RT calls.

    Fixes PR26803.

  This fixes a fatal "Cannot select" backend error when building the
  net/freerdp port for AArch64.

  PR:		214380
  MFC after:	3 days

Changes:
  head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Comment 4 commit-hook freebsd_committer 2016-11-14 18:55:26 UTC
A commit references this bug:

Author: dim
Date: Mon Nov 14 18:54:31 UTC 2016
New revision: 308647
URL: https://svnweb.freebsd.org/changeset/base/308647

Log:
  MFC r308487:

  Pull in r263301 from upstream llvm trunk (by Ahmed Bougacha):

    [AArch64] Don't blindly lower f16/f128 FCCMPs.

    Instead, extend f16 (like we do when lowering a standalone SETCC),
    and let f128 be legalized to the RT calls.

    Fixes PR26803.

  This fixes a fatal "Cannot select" backend error when building the
  net/freerdp port for AArch64.

  PR:		214380

Changes:
_U  stable/11/
  stable/11/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp