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

LLVM ERROR: Cannot emit physreg copy instruction #35393

Closed
fredrikekre opened this issue Apr 7, 2020 · 7 comments · Fixed by #35403
Closed

LLVM ERROR: Cannot emit physreg copy instruction #35393

fredrikekre opened this issue Apr 7, 2020 · 7 comments · Fixed by #35403
Assignees
Labels
upstream The issue is with an upstream dependency, e.g. LLVM

Comments

@fredrikekre
Copy link
Member

I get

LLVM ERROR: Cannot emit physreg copy instruction

on 16652a6 with Travis Linux, see https://travis-ci.org/github/fredrikekre/Literate.jl/jobs/672110054#L186

Restarting gave the same error and there are no more stacktrace info.

@vtjnash
Copy link
Member

vtjnash commented Apr 7, 2020

I'm seeing this too

@vtjnash vtjnash self-assigned this Apr 7, 2020
@omus
Copy link
Member

omus commented Apr 7, 2020

☝️ I'm also seeing this on private packages

@vtjnash
Copy link
Member

vtjnash commented Apr 7, 2020

So the specific error I get is Cannot copy ZMM4 to RDI from llvm::X86InstrInfo::copyPhysReg from

bb.7.vector.body:
; predecessors: %bb.6, %bb.7
  successors: %bb.7(0x7c000000), %bb.8(0x04000000); %bb.7(96.88%), %bb.8(3.12%)
  liveins: $rax, $rdx, $rsi, $r8, $r12, $r13, $r14, $zmm0, $zmm1, $zmm2, $zmm3, $r9d
  renamable $zmm4 = VMOVDQU64Zrm renamable $r13, 8, renamable $rsi, 8, $noreg, debug-location !60506 :: (load 64 from %ir.34, align 8, !tbaa !11991); tuple.jl:24 @[ tuple.jl:61 @[ array.jl:1605 ] ]
  renamable $zmm5 = VMOVDQU64Zrm renamable $r13, 8, renamable $rsi, 72, $noreg, debug-location !60506 :: (load 64 from %ir.36, align 8, !tbaa !11991); tuple.jl:24 @[ tuple.jl:61 @[ array.jl:1605 ] ]
  renamable $zmm6 = VMOVDQU64Zrm renamable $r13, 8, renamable $rsi, 136, $noreg, debug-location !60506 :: (load 64 from %ir.38, align 8, !tbaa !11991); tuple.jl:24 @[ tuple.jl:61 @[ array.jl:1605 ] ]
  renamable $zmm7 = VMOVDQU64Zrm renamable $r13, 8, renamable $rsi, 200, $noreg, debug-location !60506 :: (load 64 from %ir.40, align 8, !tbaa !11991); tuple.jl:24 @[ tuple.jl:61 @[ array.jl:1605 ] ]
  renamable $rdi = COPY killed renamable $zmm4
  renamable $rdi = ADD64ri32 killed renamable $rdi(tied-def 0), 8, implicit-def dead $eflags
  renamable $rbp = COPY killed renamable $zmm5
  renamable $rbp = ADD64ri32 killed renamable $rbp(tied-def 0), 8, implicit-def dead $eflags
  renamable $rbx = COPY killed renamable $zmm6
  renamable $rbx = ADD64ri32 killed renamable $rbx(tied-def 0), 8, implicit-def dead $eflags
  renamable $rcx = COPY killed renamable $zmm7
  renamable $rcx = ADD64ri32 killed renamable $rcx(tied-def 0), 8, implicit-def dead $eflags
  renamable $k1 = KSET1W debug-location !60502; array.jl:221 @[ array.jl:1605 ]
  early-clobber renamable $zmm4, dead renamable $k1 = VPGATHERQQZrm undef renamable $zmm4(tied-def 0), killed renamable $k1(tied-def 1), $noreg, 1, killed renamable $rdi, 0, $noreg, debug-location !60502 :: (load 64, align 8, !tbaa 
!11878); array.jl:221 @[ array.jl:1605 ]
  renamable $zmm0 = VPADDQZrr killed renamable $zmm4, killed renamable $zmm0, debug-location !60507; int.jl:86 @[ array.jl:1605 ]
  renamable $k1 = KSET1W debug-location !60502; array.jl:221 @[ array.jl:1605 ]
  early-clobber renamable $zmm4, dead renamable $k1 = VPGATHERQQZrm undef renamable $zmm4(tied-def 0), killed renamable $k1(tied-def 1), $noreg, 1, killed renamable $rbp, 0, $noreg, debug-location !60502 :: (load 64, align 8, !tbaa 
!11878); array.jl:221 @[ array.jl:1605 ]
  renamable $zmm1 = VPADDQZrr killed renamable $zmm4, killed renamable $zmm1, debug-location !60507; int.jl:86 @[ array.jl:1605 ]
  renamable $k1 = KSET1W debug-location !60502; array.jl:221 @[ array.jl:1605 ]
  early-clobber renamable $zmm4, dead renamable $k1 = VPGATHERQQZrm undef renamable $zmm4(tied-def 0), killed renamable $k1(tied-def 1), $noreg, 1, killed renamable $rbx, 0, $noreg, debug-location !60502 :: (load 64, align 8, !tbaa 
!11878); array.jl:221 @[ array.jl:1605 ]
  renamable $zmm2 = VPADDQZrr killed renamable $zmm4, killed renamable $zmm2, debug-location !60507; int.jl:86 @[ array.jl:1605 ]
  renamable $k1 = KSET1W debug-location !60502; array.jl:221 @[ array.jl:1605 ]
  early-clobber renamable $zmm4, dead renamable $k1 = VPGATHERQQZrm undef renamable $zmm4(tied-def 0), killed renamable $k1(tied-def 1), $noreg, 1, killed renamable $rcx, 0, $noreg, debug-location !60502 :: (load 64, align 8, !tbaa 
!11878); array.jl:221 @[ array.jl:1605 ]
  renamable $zmm3 = VPADDQZrr killed renamable $zmm4, killed renamable $zmm3, debug-location !60507; int.jl:86 @[ array.jl:1605 ]
  renamable $rsi = ADD64ri32 killed renamable $rsi(tied-def 0), 32, implicit-def dead $eflags
  CMP64rr renamable $rdx, renamable $rsi, implicit-def $eflags
  JCC_1 %bb.7, 5, implicit $eflags

https://gist.github.com/vtjnash/633ae4c495e0369633018138f2c2ac2b

Anyone know if something changed recently?

@sethaxen
Copy link
Contributor

sethaxen commented Apr 8, 2020

I'm seeing this as well.

@chriselrod
Copy link
Contributor

My git bisect blames 78e4c2d

@DilumAluthge
Copy link
Member

Also, the latest daily PkgEval report (https://github.com/JuliaCI/NanosoldierReports/blob/master/pkgeval/by_date/2020-04/07/report.md) says:

In total, 3376 packages were tested, out of which 646 succeeded, 2381 failed and 349 were skipped.

Many of these failures are due to this issue. See e.g. https://github.com/JuliaCI/NanosoldierReports/blob/master/pkgeval/by_date/2020-04/07/logs/Example/1.5.0-DEV-16652a6655.log:

Julia Version 1.5.0-DEV.585
Commit 16652a6655* (2020-04-07 09:45 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
Environment:
  JULIA_DEPOT_PATH = ::/usr/local/share/julia
  JULIA_NUM_THREADS = 2

  Resolving package versions...
LLVM ERROR: Cannot emit physreg copy instruction

@vtjnash
Copy link
Member

vtjnash commented May 13, 2020

Filed upstream also: https://bugs.llvm.org/show_bug.cgi?id=45906

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream The issue is with an upstream dependency, e.g. LLVM
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants