[Bug 227698] www/iridium, www/qt5-webengine: clang 6.0 crashes during build

2018-04-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227698

Jan Beich  changed:

   What|Removed |Added

   Assignee|ports-b...@freebsd.org  |toolch...@freebsd.org

--- Comment #3 from Jan Beich  ---
Can you bisect?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 227698] www/iridium, www/qt5-webengine: clang 6.0 crashes during build

2018-04-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227698

--- Comment #4 from Jan Beich  ---
Note, -m32 or -target i386-unknown-freebsd12.0 won't trigger the crash. Make
sure to run 32bit Clang binary.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 227698] www/iridium, www/qt5-webengine: clang 6.0 crashes during build

2018-04-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227698

--- Comment #5 from Jan Beich  ---
Regression range: base r332632 (good) and base r332849 (bad). Probably a dupe
of bug 227686. My guess, base r332833 and ports r467849 are culprits.

http://beefy11.nyi.freebsd.org/data/head-i386-default/p467853_s332849/logs/iridium-browser-58.0_13.log
http://beefy11.nyi.freebsd.org/data/head-i386-default/p467853_s332849/logs/qt5-webengine-5.9.4_1.log

vs. green logs

http://beefy11.nyi.freebsd.org/data/head-i386-default/p467743_s332632/logs/iridium-browser-58.0_13.log
http://beefy11.nyi.freebsd.org/data/head-i386-default/p467743_s332632/logs/qt5-webengine-5.9.4_1.log

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 227698] www/iridium, www/qt5-webengine: clang 6.0 crashes during build

2018-04-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227698

Jan Beich  changed:

   What|Removed |Added

   Keywords|needs-qa|regression
 Blocks|224669  |225330


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224669
[Bug 224669] [exp-run] Against projects/clang600-import branch
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225330
[Bug 225330] clang bug can incorrectly enable or disable interrupts on amd64
-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 227698] www/iridium, www/qt5-webengine: clang 6.0 crashes during build

2018-04-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227698

--- Comment #6 from Jan Beich  ---
Another note: www/chromium isn't affected because of bug 226458.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 227698] www/iridium, www/qt5-webengine: clang 6.0 crashes during build

2018-04-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227698

--- Comment #7 from Jan Beich  ---
Nevermind comment 4. I forgot to update jail/package on amd64.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 227698] www/iridium, www/qt5-webengine: clang 6.0 crashes during build

2018-04-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227698

Jan Beich  changed:

   What|Removed |Added

 Blocks||227683


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227683
[Bug 227683] www/chromium, www/iridium, www/qt5-webengine: switch to llvm60
-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 227698] www/iridium, www/qt5-webengine: clang 6.0 crashes during build

2018-04-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227698

Dimitry Andric  changed:

   What|Removed |Added

 CC||d...@freebsd.org,
   ||ema...@freebsd.org,
   ||j...@freebsd.org
   Assignee|toolch...@freebsd.org   |d...@freebsd.org
 Status|New |Open

--- Comment #8 from Dimitry Andric  ---
I can reproduce, it's caused by r332833 (the upstream fixes for EFLAGS),
similar to bug 227686, but I'm not sure if it has exactly the same cause.  I'm
going to make a minimized test case, and figure out which of the upstream
revisions caused it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 227698] www/iridium, www/qt5-webengine: clang 6.0 crashes during build

2018-04-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227698

Rodney W. Grimes  changed:

   What|Removed |Added

 CC||toolch...@freebsd.org

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 227698] www/iridium, www/qt5-webengine: clang 6.0 crashes during build

2018-04-23 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227698

Carlos J. Puga Medina  changed:

   What|Removed |Added

 CC||c...@freebsd.org

--- Comment #9 from Carlos J. Puga Medina  ---
Iridium can be updated to 2017.11 (based on the Chromium version 62.0.3202.94),
but I will need some time to update the port or more manpower to achieve this
goal before.

Anyway I just realized that the Iridium developers are working on 65.x release

http://lists.inai.de/pipermail/iridium/2018-April/000725.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 227698] www/iridium, www/qt5-webengine: clang 6.0 crashes during build

2018-04-23 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227698

--- Comment #10 from commit-h...@freebsd.org ---
A commit references this bug:

Author: dim
Date: Mon Apr 23 23:07:58 UTC 2018
New revision: 332898
URL: https://svnweb.freebsd.org/changeset/base/332898

Log:
  Pull in r329771 from upstream llvm trunk (by Craig Topper):

[X86] In X86FlagsCopyLowering, when rewriting a memory setcc we need
to emit an explicit MOV8mr instruction.

Previously the code only knew how to handle setcc to a register.

This should fix a crash in the chromium build.

  This fixes various assertion failures while building ports targeting
  i386:
  * www/firefox: isReg() && "This is not a register operand!"
  * www/iridium, www/qt5-webengine: (I.atEnd() || std::next(I) ==
def_instr_end()) && "getVRegDef assumes a single definition or no
definition"
  * devel/powerpc64-gcc: FromReg != ToReg && "Cannot replace a reg with
itself"

  Reported by:  jbeich
  PR:   225330, 227686, 227698, 227699
  MFC after:1 week
  X-MFC-With:   r332833

Changes:
  head/contrib/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 227698] www/iridium, www/qt5-webengine: clang 6.0 crashes during build

2018-04-27 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227698

--- Comment #11 from commit-h...@freebsd.org ---
A commit references this bug:

Author: jbeich
Date: Fri Apr 27 17:41:18 UTC 2018
New revision: 468476
URL: https://svnweb.freebsd.org/changeset/ports/468476

Log:
  devel/llvm60: apply i386 crashfix after r467849

  PR:   227686, 227698
  Approved by:  portmgr blanket

Changes:
  head/devel/llvm60/Makefile
  head/devel/llvm60/files/patch-fsvn-r332898

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 227698] www/iridium, www/qt5-webengine: clang 6.0 crashes during build

2018-04-27 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227698

Jan Beich  changed:

   What|Removed |Added

 Status|Open|Closed
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 227698] www/iridium, www/qt5-webengine: clang 6.0 crashes during build

2018-04-27 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227698

--- Comment #12 from commit-h...@freebsd.org ---
A commit references this bug:

Author: dim
Date: Fri Apr 27 19:21:42 UTC 2018
New revision: 333070
URL: https://svnweb.freebsd.org/changeset/base/333070

Log:
  MFC r332833:

  Recommit r332501, with an additional upstream fix for "Cannot lower
  EFLAGS copy that lives out of a basic block!" errors on i386.

  Pull in r325446 from upstream clang trunk (by me):

[X86] Add 'sahf' CPU feature to frontend

Summary:
Make clang accept `-msahf` (and `-mno-sahf`) flags to activate the
`+sahf` feature for the backend, for bug 36028 (Incorrect use of
pushf/popf enables/disables interrupts on amd64 kernels).  This was
originally submitted in bug 36037 by Jonathan Looney
.

As described there, GCC also uses `-msahf` for this feature, and the
backend already recognizes the `+sahf` feature. All that is needed is
to teach clang to pass this on to the backend.

The mapping of feature support onto CPUs may not be complete; rather,
it was chosen to match LLVM's idea of which CPUs support this feature
(see lib/Target/X86/X86.td).

I also updated the affected test case (CodeGen/attr-target-x86.c) to
match the emitted output.

Reviewers: craig.topper, coby, efriedma, rsmith

Reviewed By: craig.topper

Subscribers: emaste, cfe-commits

Differential Revision: https://reviews.llvm.org/D43394

  Pull in r328944 from upstream llvm trunk (by Chandler Carruth):

[x86] Expose more of the condition conversion routines in the public
API for X86's instruction information. I've now got a second patch
under review that needs these same APIs. This bit is nicely
orthogonal and obvious, so landing it. NFC.

  Pull in r329414 from upstream llvm trunk (by Craig Topper):

[X86] Merge itineraries for CLC, CMC, and STC.

These are very simple flag setting instructions that appear to only
be a single uop. They're unlikely to need this separation.

  Pull in r329657 from upstream llvm trunk (by Chandler Carruth):

[x86] Introduce a pass to begin more systematically fixing PR36028
and similar issues.

The key idea is to lower COPY nodes populating EFLAGS by scanning the
uses of EFLAGS and introducing dedicated code to preserve the
necessary state in a GPR. In the vast majority of cases, these uses
are cmovCC and jCC instructions. For such cases, we can very easily
save and restore the necessary information by simply inserting a
setCC into a GPR where the original flags are live, and then testing
that GPR directly to feed the cmov or conditional branch.

However, things are a bit more tricky if arithmetic is using the
flags.  This patch handles the vast majority of cases that seem to
come up in practice: adc, adcx, adox, rcl, and rcr; all without
taking advantage of partially preserved EFLAGS as LLVM doesn't
currently model that at all.

There are a large number of operations that techinaclly observe
EFLAGS currently but shouldn't in this case -- they typically are
using DF.  Currently, they will not be handled by this approach.
However, I have never seen this issue come up in practice. It is
already pretty rare to have these patterns come up in practical code
with LLVM. I had to resort to writing MIR tests to cover most of the
logic in this pass already.  I suspect even with its current amount
of coverage of arithmetic users of EFLAGS it will be a significant
improvement over the current use of pushf/popf. It will also produce
substantially faster code in most of the common patterns.

This patch also removes all of the old lowering for EFLAGS copies,
and the hack that forced us to use a frame pointer when EFLAGS copies
were found anywhere in a function so that the dynamic stack
adjustment wasn't a problem. None of this is needed as we now lower
all of these copies directly in MI and without require stack
adjustments.

Lots of thanks to Reid who came up with several aspects of this
approach, and Craig who helped me work out a couple of things
tripping me up while working on this.

Differential Revision: https://reviews.llvm.org/D45146

  Pull in r329673 from upstream llvm trunk (by Chandler Carruth):

[x86] Model the direction flag (DF) separately from the rest of
EFLAGS.

This cleans up a number of operations that only claimed te use EFLAGS
due to using DF. But no instructions which we think of us setting
EFLAGS actually modify DF (other than things like popf) and so this
needlessly creates uses of EFLAGS that aren't really there.

In fact, DF is so restrictive it is pretty easy to model. Only STD,
CLD, and the whole-flags writes (WRFLAGS and POPF) need to model
this.

I've also somewhat cleaned up some of the flag management instruction
definitions to be in the corr