| Summary: | CPUTYPE=skylake build broken | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Nikolai Lifanov <lifanov> | ||||||||||
| Component: | misc | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||||||||
| Status: | Closed Overcome By Events | ||||||||||||
| Severity: | Affects Only Me | CC: | dim | ||||||||||
| Priority: | --- | ||||||||||||
| Version: | CURRENT | ||||||||||||
| Hardware: | Any | ||||||||||||
| OS: | Any | ||||||||||||
| Attachments: |
|
||||||||||||
Created attachment 173258 [details]
ns_name-287f0a.c
Created attachment 173259 [details]
ns_name-287f0a.sh
I can reproduce the assertion. It works in more recent clang trunk, so I will figure out where it got fixed. Hm, so after hand merging llvm r263417 [1], which fixes your original test case, I tried a buildworld with CPUTYPE=skylake, and I got another crash:
fatal error: error in backend: Cannot select: t24: i32 = X86ISD::CMP t48, t51
t48: i1 = truncate t47
t47: i8 = and t32, t35
t32: i8 = X86ISD::SETCC Constant:i8<4>, t30
t31: i8 = Constant<4>
t30: i32 = X86ISD::CMP t4, Constant:i8<0>
t4: i8 = AssertZext t2, ValueType:ch:i1
t2: i8,ch = CopyFromReg t0, Register:i8 %vreg375
t1: i8 = Register %vreg375
t5: i8 = Constant<0>
t35: i8 = X86ISD::SETCC Constant:i8<4>, t34:1
t31: i8 = Constant<4>
t34: i32,i32 = X86ISD::SUB t9, Constant:i32<101>
t9: i32,ch = CopyFromReg t0, Register:i32 %vreg378
t8: i32 = Register %vreg378
t11: i32 = Constant<101>
t51: i1 = truncate t50
t50: i8 = or t32, t38
t32: i8 = X86ISD::SETCC Constant:i8<4>, t30
t31: i8 = Constant<4>
t30: i32 = X86ISD::CMP t4, Constant:i8<0>
t4: i8 = AssertZext t2, ValueType:ch:i1
t2: i8,ch = CopyFromReg t0, Register:i8 %vreg375
t1: i8 = Register %vreg375
t5: i8 = Constant<0>
t38: i8 = X86ISD::SETCC Constant:i8<9>, t37:1
t25: i8 = Constant<9>
t37: i32,i32 = X86ISD::SUB t9, Constant:i32<112>
t9: i32,ch = CopyFromReg t0, Register:i32 %vreg378
t8: i32 = Register %vreg378
t14: i32 = Constant<112>
In function: __vfwscanf
So all is not well yet for -march=skylake. I will investigate further, but maybe complete Skylake support is something that has to wait for clang 3.9.0.
[1] http://llvm.org/viewvc/llvm-project?view=revision&revision=263417
Thanks for looking into it! I don't think it's a problem to wait for 3.9.0 if it has full Skylake support. I have taken a look, and it would require many patches to get all the Skylake stuff to work correctly. Every time I applied an upstream patch, some other program during buildworld would cause an assertion or another problem. I think it is better to consider CPUTYPE=skylake broken, until we can import 3.9.0. So let's keep this bug open for the time being. This compiles with clang/llvm 3.9.0, but I can't chroot or jexec -l into the result with "Illegal instruction (core dumped)". No core files are produced. I'm pretty sure that my CPU is gen 6. I'm attaching the cpuid output. Created attachment 177450 [details]
cpuid
Never mind, I don't think this one is Skylake. This can be closed now. Closed at submitter's request. |
Created attachment 173257 [details] error output I just got a Skylake system and build with CPUTYPE=skylake is broken. I can build with CPUTYPE=haswell or without CPUTYPE just fine. See attachment for build error.