Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jul 2026 07:20:05 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 297112] Please cherry-pick  b23ba298 to CURRENT to fix math/p5-PDL on powerpc64le with IEEE ldbl
Message-ID:  <bug-297112-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297112

            Bug ID: 297112
           Summary: Please cherry-pick  b23ba298 to CURRENT to fix
                    math/p5-PDL on powerpc64le with IEEE ldbl
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: pkubaj@FreeBSD.org

On powerpc64le with IEEE-128 long double, clang aborts while compiling
ports that test a long double for NaN -- e.g. math/p5-PDL's anyval_isbad:

  Assertion failed: (Legalized && "Can't legalize BR_CC with legal
  condition!"), function ExpandNode, LegalizeDAG.cpp

At -O2 the source pattern "fcmp uno x, 0.0 || fcmp uno y, 0.0" is left as
two unordered f128 compares feeding a logical or.  SelectionDAG lowers
that to a SETCC + BrCond which the PowerPC legalizer turns into an
illegal f128 BR_CC it cannot expand, hence the assert.

Upstream b23ba298 teaches InstCombine to fold the pair into a single
"fcmp uno x, y" (freezing the second operand for poison safety), so the
optimizer no longer emits the crashing shape.  The PowerPC backend
legalizer bug itself remains latent.

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-297112-227>