Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-14978] Illegal instruction pshufb generated for old AMD CPU #57320

Closed
dhoepfl opened this issue Jul 26, 2021 · 1 comment
Closed

[SR-14978] Illegal instruction pshufb generated for old AMD CPU #57320

dhoepfl opened this issue Jul 26, 2021 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@dhoepfl
Copy link
Contributor

dhoepfl commented Jul 26, 2021

Previous ID SR-14978
Radar None
Original Reporter @dhoepfl
Type Bug
Status Closed
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: b9de2ff1b667523d0a51e35d41a965fe

blocks:

  • SR-14903 Crash while compiling swift on Debian

Issue Description:

TL;DR: When compiling Swift, the generated swift-frontend uses pshufb which is not supported by the CPU it is running on and building for.


For a few weeks, compiling the swift compiler fails on my machine. (Linux, Debian)

The failing command is:

/home/user/llvm/opt/usr/bin/swift-frontend -frontend -c -primary-file /home/user/llvm/swift-source/swift/benchmark/single-source/LuhnAlgoEager.swift -emit-module-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager~partial.swiftmodule -emit-module-doc-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager~partial.swiftdoc -emit-module-source-info-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager~partial.swiftsourceinfo -emit-dependencies-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager.d -emit-reference-dependencies-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager.swiftdeps -target x86_64-unknown-linux-gnu -disable-objc-interop -I /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug -enable-testing -g -module-cache-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/ModuleCache -swift-version 4 -Onone -D SWIFT_PACKAGE -D DEBUG -enable-anonymous-context-mangled-names -Xllvm -align-module-to-page-size -parse-as-library -module-name LuhnAlgoEager -o /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager.swift.o -index-store-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/index/store -index-system-modules

I ran the command in gdb:

user@host:~/llvm> gdb ./swift-source/build/buildbot_linux/swift-linux-x86_64/bin/swift-frontend
GNU gdb (Debian 8.2.1-2+b3) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./swift-source/build/buildbot_linux/swift-linux-x86_64/bin/swift-frontend...(no debugging symbols found)...done.
(gdb) set args -frontend -c -primary-file /home/user/llvm/swift-source/swift/benchmark/single-source/LuhnAlgoEager.swift -emit-module-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager~partial.swiftmodule -emit-module-doc-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager~partial.swiftdoc -emit-module-source-info-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager~partial.swiftsourceinfo -emit-dependencies-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager.d -emit-reference-dependencies-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager.swiftdeps -target x86_64-unknown-linux-gnu -disable-objc-interop -I /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug -enable-testing -g -module-cache-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/ModuleCache -swift-version 4 -Onone -D SWIFT_PACKAGE -D DEBUG -enable-anonymous-context-mangled-names -Xllvm -align-module-to-page-size -parse-as-library -module-name LuhnAlgoEager -o /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager.swift.o -index-store-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/index/store -index-system-modules
(gdb) run
Starting program: /home/user/llvm/opt/usr/bin/swift-frontend -frontend -c -primary-file /home/user/llvm/swift-source/swift/benchmark/single-source/LuhnAlgoEager.swift -emit-module-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager~partial.swiftmodule -emit-module-doc-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager~partial.swiftdoc -emit-module-source-info-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager~partial.swiftsourceinfo -emit-dependencies-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager.d -emit-reference-dependencies-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager.swiftdeps -target x86_64-unknown-linux-gnu -disable-objc-interop -I /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug -enable-testing -g -module-cache-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/ModuleCache -swift-version 4 -Onone -D SWIFT_PACKAGE -D DEBUG -enable-anonymous-context-mangled-names -Xllvm -align-module-to-page-size -parse-as-library -module-name LuhnAlgoEager -o /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/LuhnAlgoEager.build/LuhnAlgoEager.swift.o -index-store-path /home/user/llvm/swift-source/build/buildbot_linux/benchmarks-linux-x86_64/Benchmark_Onone/x86_64-unknown-linux-gnu/debug/index/store -index-system-modules
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
isValidIdentifierContinuationCodePoint(2022)Program received signal SIGILL, Illegal instruction.
0x0000000001b46e5b in isValidIdentifierContinuationCodePoint(unsigned int) ()
(gdb) disassemble
Dump of assembler code for function _ZL38isValidIdentifierContinuationCodePointj:
   0x0000000001b46d10 <+0>:     push   %rbx
   0x0000000001b46d11 <+1>:     mov    %edi,%ebx
   0x0000000001b46d13 <+3>:     cmp    $0x7f,%edi
   0x0000000001b46d16 <+6>:     ja     0x1b46d32 <_ZL38isValidIdentifierContinuationCodePointj+34>
   0x0000000001b46d18 <+8>:     movzbl %bl,%eax
   0x0000000001b46d1b <+11>:    lea    0x67c2f6e(%rip),%rcx        # 0x8309c90 <_ZN5clang8charinfo9InfoTableE>
   0x0000000001b46d22 <+18>:    testb  $0xe8,(%rcx,%rax,2)
   0x0000000001b46d26 <+22>:    setne  %cl
   0x0000000001b46d29 <+25>:    cmp    $0x24,%al
   0x0000000001b46d2b <+27>:    sete   %al
   0x0000000001b46d2e <+30>:    or     %cl,%al
   0x0000000001b46d30 <+32>:    pop    %rbx
   0x0000000001b46d31 <+33>:    retq
   0x0000000001b46d32 <+34>:    mov    %ebx,%esi
   0x0000000001b46d34 <+36>:    lea    0x4c656e7(%rip),%rdi        # 0x67ac422
   0x0000000001b46d3b <+43>:    xor    %eax,%eax
   0x0000000001b46d3d <+45>:    callq  0x408730 <printf@plt>
   0x0000000001b46d42 <+50>:    lea    -0xa8(%rbx),%ecx
   0x0000000001b46d48 <+56>:    cmp    $0x8,%ecx
   0x0000000001b46d4b <+59>:    jae    0x1b46d5d <_ZL38isValidIdentifierContinuationCodePointj+77>
   0x0000000001b46d4d <+61>:    mov    $0x1,%al
   0x0000000001b46d4f <+63>:    mov    $0xa5,%edx
   0x0000000001b46d54 <+68>:    bt     %ecx,%edx
   0x0000000001b46d57 <+71>:    jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46d5d <+77>:    lea    -0x202a(%rbx),%ecx
   0x0000000001b46d63 <+83>:    mov    $0x1,%al
   0x0000000001b46d65 <+85>:    cmp    $0x5,%ecx
   0x0000000001b46d68 <+88>:    jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46d6e <+94>:    lea    -0x200b(%rbx),%ecx
   0x0000000001b46d74 <+100>:   cmp    $0x3,%ecx
   0x0000000001b46d77 <+103>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46d7d <+109>:   lea    -0x180f(%rbx),%ecx
   0x0000000001b46d83 <+115>:   cmp    $0x7f1,%ecx
   0x0000000001b46d89 <+121>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46d8b <+123>:   lea    -0x1681(%rbx),%ecx
   0x0000000001b46d91 <+129>:   cmp    $0x18d,%ecx
   0x0000000001b46d97 <+135>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46d99 <+137>:   lea    -0x100(%rbx),%ecx
   0x0000000001b46d9f <+143>:   cmp    $0x1580,%ecx
   0x0000000001b46da5 <+149>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46da7 <+151>:   mov    %ebx,%ecx
   0x0000000001b46da9 <+153>:   and    $0xfffffff8,%ecx
   0x0000000001b46dac <+156>:   cmp    $0xf8,%ecx
   0x0000000001b46db2 <+162>:   je     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46db4 <+164>:   lea    -0xd8(%rbx),%ecx
   0x0000000001b46dba <+170>:   cmp    $0x1f,%ecx
   0x0000000001b46dbd <+173>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46dbf <+175>:   lea    -0xc0(%rbx),%ecx
   0x0000000001b46dc5 <+181>:   cmp    $0x17,%ecx
   0x0000000001b46dc8 <+184>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46dca <+186>:   lea    -0xbc(%rbx),%ecx
   0x0000000001b46dd0 <+192>:   cmp    $0x3,%ecx
   0x0000000001b46dd3 <+195>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46dd5 <+197>:   lea    -0xb2(%rbx),%ecx
   0x0000000001b46ddb <+203>:   cmp    $0x4,%ecx
   0x0000000001b46dde <+206>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46de0 <+208>:   lea    -0xb7(%rbx),%ecx
   0x0000000001b46de6 <+214>:   cmp    $0x4,%ecx
   0x0000000001b46de9 <+217>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46deb <+219>:   lea    -0x203f(%rbx),%ecx
   0x0000000001b46df1 <+225>:   cmp    $0x15,%ecx
   0x0000000001b46df4 <+228>:   ja     0x1b46e02 <_ZL38isValidIdentifierContinuationCodePointj+242>
   0x0000000001b46df6 <+230>:   mov    $0x200003,%edx
   0x0000000001b46dfb <+235>:   bt     %ecx,%edx
   0x0000000001b46dfe <+238>:   jae    0x1b46e02 <_ZL38isValidIdentifierContinuationCodePointj+242>
   0x0000000001b46e00 <+240>:   pop    %rbx
   0x0000000001b46e01 <+241>:   retq
   0x0000000001b46e02 <+242>:   movd   %ebx,%xmm0
   0x0000000001b46e06 <+246>:   pshufd $0x0,%xmm0,%xmm2
   0x0000000001b46e0b <+251>:   movdqa 0x4172a8d(%rip),%xmm0        # 0x5cb98a0
   0x0000000001b46e13 <+259>:   paddd  %xmm2,%xmm0
   0x0000000001b46e17 <+263>:   movdqa 0x4172a91(%rip),%xmm3        # 0x5cb98b0
   0x0000000001b46e1f <+271>:   paddd  %xmm2,%xmm3
   0x0000000001b46e23 <+275>:   movdqa 0x4172a95(%rip),%xmm4        # 0x5cb98c0
   0x0000000001b46e2b <+283>:   paddd  %xmm2,%xmm4
   0x0000000001b46e2f <+287>:   paddd  0x4172a99(%rip),%xmm2        # 0x5cb98d0
   0x0000000001b46e37 <+295>:   movdqa 0x4172aa1(%rip),%xmm5        # 0x5cb98e0
   0x0000000001b46e3f <+303>:   pxor   %xmm5,%xmm2
   0x0000000001b46e43 <+307>:   movdqa 0x4172aa5(%rip),%xmm1        # 0x5cb98f0
   0x0000000001b46e4b <+315>:   movdqa %xmm1,%xmm6
   0x0000000001b46e4f <+319>:   pcmpgtd %xmm2,%xmm6
   0x0000000001b46e53 <+323>:   movdqa 0x4171565(%rip),%xmm2        # 0x5cb83c0
=> 0x0000000001b46e5b <+331>:   pshufb %xmm2,%xmm6
   0x0000000001b46e60 <+336>:   pxor   %xmm5,%xmm4
   0x0000000001b46e64 <+340>:   movdqa %xmm1,%xmm7
   0x0000000001b46e68 <+344>:   pcmpgtd %xmm4,%xmm7
   0x0000000001b46e6c <+348>:   pshufb %xmm2,%xmm7
   0x0000000001b46e71 <+353>:   punpckldq %xmm6,%xmm7
   0x0000000001b46e75 <+357>:   pxor   %xmm5,%xmm3
   0x0000000001b46e79 <+361>:   movdqa 0x4172a7f(%rip),%xmm2        # 0x5cb9900
   0x0000000001b46e81 <+369>:   pcmpgtd %xmm3,%xmm2
   0x0000000001b46e85 <+373>:   movdqa 0x4171543(%rip),%xmm3        # 0x5cb83d0
   0x0000000001b46e8d <+381>:   pshufb %xmm3,%xmm2
   0x0000000001b46e92 <+386>:   pxor   %xmm5,%xmm0
   0x0000000001b46e96 <+390>:   pcmpgtd %xmm0,%xmm1
   0x0000000001b46e9a <+394>:   pshufb %xmm3,%xmm1
   0x0000000001b46e9f <+399>:   punpckldq %xmm2,%xmm1
   0x0000000001b46ea3 <+403>:   movdqa %xmm1,%xmm0
   0x0000000001b46ea7 <+407>:   movsd  %xmm7,%xmm0
   0x0000000001b46eab <+411>:   palignr $0x8,%xmm1,%xmm7
   0x0000000001b46eb1 <+417>:   por    %xmm0,%xmm7
   0x0000000001b46eb5 <+421>:   pshufd $0xe5,%xmm7,%xmm0
   0x0000000001b46eba <+426>:   por    %xmm7,%xmm0
   0x0000000001b46ebe <+430>:   movdqa %xmm0,%xmm1
   0x0000000001b46ec2 <+434>:   psrld  $0x10,%xmm1
   0x0000000001b46ec7 <+439>:   por    %xmm0,%xmm1
   0x0000000001b46ecb <+443>:   movdqa %xmm1,%xmm0
   0x0000000001b46ecf <+447>:   psrlw  $0x8,%xmm0
   0x0000000001b46ed4 <+452>:   por    %xmm1,%xmm0
   0x0000000001b46ed8 <+456>:   movd   %xmm0,%ecx
   0x0000000001b46edc <+460>:   test   $0x1,%cl
   0x0000000001b46edf <+463>:   jne    0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46ee5 <+469>:   lea    -0xf900(%rbx),%ecx
   0x0000000001b46eeb <+475>:   cmp    $0x43e,%ecx
   0x0000000001b46ef1 <+481>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46ef7 <+487>:   lea    -0x3040(%rbx),%ecx
   0x0000000001b46efd <+493>:   cmp    $0xa7c0,%ecx
   0x0000000001b46f03 <+499>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46f09 <+505>:   lea    -0x3031(%rbx),%ecx
   0x0000000001b46f0f <+511>:   cmp    $0xf,%ecx
   0x0000000001b46f12 <+514>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46f18 <+520>:   lea    -0x3021(%rbx),%ecx
   0x0000000001b46f1e <+526>:   cmp    $0xf,%ecx
   0x0000000001b46f21 <+529>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46f27 <+535>:   mov    %ebx,%ecx
   0x0000000001b46f29 <+537>:   and    $0xfffffffc,%ecx
   0x0000000001b46f2c <+540>:   cmp    $0x3004,%ecx
   0x0000000001b46f32 <+546>:   je     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46f38 <+552>:   lea    -0x2e80(%rbx),%ecx
   0x0000000001b46f3e <+558>:   cmp    $0x180,%ecx
   0x0000000001b46f44 <+564>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46f4a <+570>:   mov    %ebx,%ecx
   0x0000000001b46f4c <+572>:   and    $0xfffffe00,%ecx
   0x0000000001b46f52 <+578>:   cmp    $0x2c00,%ecx
   0x0000000001b46f58 <+584>:   je     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46f5e <+590>:   lea    -0x2776(%rbx),%ecx
   0x0000000001b46f64 <+596>:   cmp    $0x1e,%ecx
   0x0000000001b46f67 <+599>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46f6d <+605>:   lea    -0x2460(%rbx),%ecx
   0x0000000001b46f73 <+611>:   cmp    $0xa0,%ecx
   0x0000000001b46f79 <+617>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46f7f <+623>:   mov    %ebx,%ecx
   0x0000000001b46f81 <+625>:   and    $0xfffffff0,%ecx
   0x0000000001b46f84 <+628>:   cmp    $0x2060,%ecx
   0x0000000001b46f8a <+634>:   je     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46f90 <+640>:   lea    -0x2070(%rbx),%ecx
   0x0000000001b46f96 <+646>:   cmp    $0x120,%ecx
   0x0000000001b46f9c <+652>:   jb     0x1b46e00 <_ZL38isValidIdentifierContinuationCodePointj+240>
   0x0000000001b46fa2 <+658>:   add    $0xfff20000,%ebx
   0x0000000001b46fa8 <+664>:   cmp    $0xfffe,%ebx
   0x0000000001b46fae <+670>:   setb   %al
   0x0000000001b46fb1 <+673>:   pop    %rbx
   0x0000000001b46fb2 <+674>:   retq
End of assembler dump.

As you can see, it trips on the pshufb instruction that is not supported by my old AMD CPU (no SSSE3):

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 6
model name      : AMD Athlon(tm) II X2 270 Processor
stepping        : 3
microcode       : 0x10000c8
cpu MHz         : 800.000
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs            : tlb_mmatch fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2
bogomips        : 6830.52
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 6
model name      : AMD Athlon(tm) II X2 270 Processor
stepping        : 3
microcode       : 0x10000c8
cpu MHz         : 800.000
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs            : tlb_mmatch fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2
bogomips        : 6830.52
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

I'm not sure if this is a swiftc bug, a clang(++) bug or if I'm holding it wrong. I'm running build-script with a profile based on buildbot_linux but disabling some tests - building takes >10h on that machine ...

@dhoepfl
Copy link
Contributor Author

dhoepfl commented Jul 26, 2021

I just noticed that I already filed that one (but didn't know the illegal instruction back then)

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

1 participant