GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2021-08-18T22:59:32Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/20145Let LLVM and Unregisterized lower greater than native sized primops2021-08-18T22:59:32ZJohn EricsonLet LLVM and Unregisterized lower greater than native sized primopsWhen using the LLVM or Unregisterized backends and compiling primops for prim types exceeding the native width, we should avoid our C stubs and let LLVM/C lower them more efficiently in-line.
NCG needs to call slow FFI functions where w...When using the LLVM or Unregisterized backends and compiling primops for prim types exceeding the native width, we should avoid our C stubs and let LLVM/C lower them more efficiently in-line.
NCG needs to call slow FFI functions where we "borrow" the C compiler's implementation, but there is no reason why we need to do that for LLVM or C.⊥John EricsonJohn Ericsonhttps://gitlab.haskell.org/ghc/ghc/-/issues/8115GHC 64-bit Windows build failures with LLVM2019-07-07T18:46:25ZschylerGHC 64-bit Windows build failures with LLVMWhen using LLVM 2.9, 3.1 or 3.4svn on Windows with the 64-bit GHC from the downloads page (http://www.haskell.org/ghc/download_ghc_7_6_3) to compile this simple program;
```
main = print "Hello!"
```
I get these errors;
```
Kyle@kyle-...When using LLVM 2.9, 3.1 or 3.4svn on Windows with the 64-bit GHC from the downloads page (http://www.haskell.org/ghc/download_ghc_7_6_3) to compile this simple program;
```
main = print "Hello!"
```
I get these errors;
```
Kyle@kyle-laptop /c/Users/Kyle/Desktop$ ghc -fllvm -fforce-recomp test.hs
[1 of 1] Compiling Main ( test.hs, test.o )
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s: Assembler messages:
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:2: Error: junk at end of line, first unrecognized character is `,'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:3: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:3: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:7: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:7: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:10: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:10: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:17: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:17: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:19: Error: junk at end of line, first unrecognized character is `,'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:20: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:20: Error: junk at end of line, first unrecognized character is `c'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:24: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:24: Error: junk at end of line, first unrecognized character is `c'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:26: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:26: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:31: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:31: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:34: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:34: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:41: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:41: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:43: Error: junk at end of line, first unrecognized character is `,'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:44: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:44: Error: junk at end of line, first unrecognized character is `M'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:50: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:50: Error: junk at end of line, first unrecognized character is `M'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:53: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:53: Error: junk at end of line, first unrecognized character is `M'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:61: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:61: Error: junk at end of line, first unrecognized character is `M'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:63: Error: junk at end of line, first unrecognized character is `,'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:64: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:64: Error: junk at end of line, first unrecognized character is `Z'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:69: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:69: Error: junk at end of line, first unrecognized character is `Z'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:72: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:72: Error: junk at end of line, first unrecognized character is `Z'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:80: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:80: Error: junk at end of line, first unrecognized character is `Z'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:82: Error: junk at end of line, first unrecognized character is `"'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:85: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:85: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:91: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:91: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:95: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:95: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:137: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:137: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:140: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:140: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:146: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:146: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:150: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:150: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:192: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:192: Error: junk at end of line, first unrecognized character is `s'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:195: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:195: Error: junk at end of line, first unrecognized character is `M'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:202: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:202: Error: junk at end of line, first unrecognized character is `M'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:207: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:207: Error: junk at end of line, first unrecognized character is `M'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:250: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:250: Error: junk at end of line, first unrecognized character is `M'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:253: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:253: Error: junk at end of line, first unrecognized character is `Z'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:260: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:260: Error: junk at end of line, first unrecognized character is `Z'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:266: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:266: Error: junk at end of line, first unrecognized character is `Z'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:308: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:308: Error: junk at end of line, first unrecognized character is `Z'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:310: Warning: .type pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:310: Error: junk at end of line, first unrecognized character is `_'
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:315: Warning: .size pseudo-op used outside of .def/.endef ignored.
C:\Users\Kyle\AppData\Local\Temp\ghc6708_0\ghc6708_0.s:315: Error: junk at end of line, first unrecognized character is `_'
```
Invocation is `ghc -fllvm test.hs`.
ghc --info:
```
Kyle@kyle-laptop /c/Users/Kyle/Desktop$ ghc --info
[("Project name","The Glorious Glasgow Haskell Compilation System")
,("GCC extra via C opts"," -fwrapv")
,("C compiler command","$topdir/../mingw/bin/gcc.exe")
,("C compiler flags"," -fno-stack-protector -Wl,--hash-size=31 -Wl,--reduce-memory-overheads")
,("ar command","$topdir/../mingw/bin/ar.exe")
,("ar flags","q")
,("ar supports at file","YES")
,("touch command","$topdir/touchy.exe")
,("dllwrap command","$topdir/../mingw/bin/dllwrap.exe")
,("windres command","$topdir/../mingw/bin/windres.exe")
,("perl command","$topdir/../perl/perl.exe")
,("target os","OSMinGW32")
,("target arch","ArchX86_64")
,("target word size","8")
,("target has GNU nonexec stack","False")
,("target has .ident directive","True")
,("target has subsections via symbols","False")
,("LLVM llc command","llc")
,("LLVM opt command","opt")
,("Project version","7.6.3")
,("Booter version","7.6.1")
,("Stage","2")
,("Build platform","x86_64-unknown-mingw32")
,("Host platform","x86_64-unknown-mingw32")
,("Target platform","x86_64-unknown-mingw32")
,("Have interpreter","YES")
,("Object splitting supported","YES")
,("Have native code generator","YES")
,("Support SMP","YES")
,("Unregisterised","NO")
,("Tables next to code","YES")
,("RTS ways","l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn")
,("Leading underscore","NO")
,("Debug on","False")
,("LibDir","C:\\Program Files\\Haskell Platform\\2013.2.0.0\\lib")
,("Global Package DB","C:\\Program Files\\Haskell Platform\\2013.2.0.0\\lib\\package.conf.d")
,("Gcc Linker flags","[\"-Wl,--hash-size=31\",\"-Wl,--reduce-memory-overheads\"]")
,("Ld Linker flags","[\"--hash-size=31\",\"--reduce-memory-overheads\"]")
]
```
No output binary is produced.
Same llvm used with 32-bit ghc works smoothly to compile the same program.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"GHC 64-bit build failures with LLVM","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"When using LLVM 2.9, 3.1 or 3.4svn on Windows with the 64-bit GHC from the downloads page (http://www.haskell.org/ghc/download_ghc_7_6_3) to compile this simple program;\r\n{{{\r\nmain = print \"Hello!\"\r\n}}}\r\n\r\nI get these errors;\r\n{{{\r\nKyle@kyle-laptop /c/Users/Kyle/Desktop$ ghc -fllvm -fforce-recomp test.hs\r\n[1 of 1] Compiling Main ( test.hs, test.o )\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s: Assembler messages:\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:2: Error: junk at end of line, first unrecognized character is `,'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:3: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:3: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:7: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:7: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:10: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:10: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:17: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:17: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:19: Error: junk at end of line, first unrecognized character is `,'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:20: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:20: Error: junk at end of line, first unrecognized character is `c'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:24: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:24: Error: junk at end of line, first unrecognized character is `c'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:26: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:26: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:31: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:31: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:34: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:34: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:41: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:41: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:43: Error: junk at end of line, first unrecognized character is `,'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:44: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:44: Error: junk at end of line, first unrecognized character is `M'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:50: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:50: Error: junk at end of line, first unrecognized character is `M'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:53: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:53: Error: junk at end of line, first unrecognized character is `M'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:61: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:61: Error: junk at end of line, first unrecognized character is `M'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:63: Error: junk at end of line, first unrecognized character is `,'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:64: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:64: Error: junk at end of line, first unrecognized character is `Z'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:69: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:69: Error: junk at end of line, first unrecognized character is `Z'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:72: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:72: Error: junk at end of line, first unrecognized character is `Z'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:80: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:80: Error: junk at end of line, first unrecognized character is `Z'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:82: Error: junk at end of line, first unrecognized character is `\"'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:85: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:85: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:91: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:91: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:95: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:95: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:137: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:137: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:140: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:140: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:146: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:146: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:150: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:150: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:192: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:192: Error: junk at end of line, first unrecognized character is `s'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:195: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:195: Error: junk at end of line, first unrecognized character is `M'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:202: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:202: Error: junk at end of line, first unrecognized character is `M'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:207: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:207: Error: junk at end of line, first unrecognized character is `M'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:250: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:250: Error: junk at end of line, first unrecognized character is `M'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:253: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:253: Error: junk at end of line, first unrecognized character is `Z'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:260: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:260: Error: junk at end of line, first unrecognized character is `Z'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:266: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:266: Error: junk at end of line, first unrecognized character is `Z'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:308: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:308: Error: junk at end of line, first unrecognized character is `Z'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:310: Warning: .type pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:310: Error: junk at end of line, first unrecognized character is `_'\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:315: Warning: .size pseudo-op used outside of .def/.endef ignored.\r\nC:\\Users\\Kyle\\AppData\\Local\\Temp\\ghc6708_0\\ghc6708_0.s:315: Error: junk at end of line, first unrecognized character is `_'\r\n}}}\r\n\r\nInvocation is `ghc -fllvm test.hs`. \r\n\r\nghc --info:\r\n{{{\r\nKyle@kyle-laptop /c/Users/Kyle/Desktop$ ghc --info\r\n [(\"Project name\",\"The Glorious Glasgow Haskell Compilation System\")\r\n ,(\"GCC extra via C opts\",\" -fwrapv\")\r\n ,(\"C compiler command\",\"$topdir/../mingw/bin/gcc.exe\")\r\n ,(\"C compiler flags\",\" -fno-stack-protector -Wl,--hash-size=31 -Wl,--reduce-memory-overheads\")\r\n ,(\"ar command\",\"$topdir/../mingw/bin/ar.exe\")\r\n ,(\"ar flags\",\"q\")\r\n ,(\"ar supports at file\",\"YES\")\r\n ,(\"touch command\",\"$topdir/touchy.exe\")\r\n ,(\"dllwrap command\",\"$topdir/../mingw/bin/dllwrap.exe\")\r\n ,(\"windres command\",\"$topdir/../mingw/bin/windres.exe\")\r\n ,(\"perl command\",\"$topdir/../perl/perl.exe\")\r\n ,(\"target os\",\"OSMinGW32\")\r\n ,(\"target arch\",\"ArchX86_64\")\r\n ,(\"target word size\",\"8\")\r\n ,(\"target has GNU nonexec stack\",\"False\")\r\n ,(\"target has .ident directive\",\"True\")\r\n ,(\"target has subsections via symbols\",\"False\")\r\n ,(\"LLVM llc command\",\"llc\")\r\n ,(\"LLVM opt command\",\"opt\")\r\n ,(\"Project version\",\"7.6.3\")\r\n ,(\"Booter version\",\"7.6.1\")\r\n ,(\"Stage\",\"2\")\r\n ,(\"Build platform\",\"x86_64-unknown-mingw32\")\r\n ,(\"Host platform\",\"x86_64-unknown-mingw32\")\r\n ,(\"Target platform\",\"x86_64-unknown-mingw32\")\r\n ,(\"Have interpreter\",\"YES\")\r\n ,(\"Object splitting supported\",\"YES\")\r\n ,(\"Have native code generator\",\"YES\")\r\n ,(\"Support SMP\",\"YES\")\r\n ,(\"Unregisterised\",\"NO\")\r\n ,(\"Tables next to code\",\"YES\")\r\n ,(\"RTS ways\",\"l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn\")\r\n ,(\"Leading underscore\",\"NO\")\r\n ,(\"Debug on\",\"False\")\r\n ,(\"LibDir\",\"C:\\\\Program Files\\\\Haskell Platform\\\\2013.2.0.0\\\\lib\")\r\n ,(\"Global Package DB\",\"C:\\\\Program Files\\\\Haskell Platform\\\\2013.2.0.0\\\\lib\\\\package.conf.d\")\r\n ,(\"Gcc Linker flags\",\"[\\\"-Wl,--hash-size=31\\\",\\\"-Wl,--reduce-memory-overheads\\\"]\")\r\n ,(\"Ld Linker flags\",\"[\\\"--hash-size=31\\\",\\\"--reduce-memory-overheads\\\"]\")\r\n ]\r\n}}}\r\n\r\nNo output binary is produced.\r\n\r\nSame llvm used with 32-bit ghc works smoothly to compile the same program.","type_of_failure":"OtherFailure","blocking":[]} -->⊥https://gitlab.haskell.org/ghc/ghc/-/issues/15013Building nofib using llvm and HEAD fails2019-07-07T18:14:41ZAndreas KlebingerBuilding nofib using llvm and HEAD fails```
== make all ;
in /home/Andi/ghc_head/nofib/shootout/pidigits
------------------------------------------------------------------------
HC = /home/Andi/ghc_head/inplace/bin/ghc-stage2
HC_OPTS = -O2 -Rghc-timing -H32m -hisuf hi -fllvm ...```
== make all ;
in /home/Andi/ghc_head/nofib/shootout/pidigits
------------------------------------------------------------------------
HC = /home/Andi/ghc_head/inplace/bin/ghc-stage2
HC_OPTS = -O2 -Rghc-timing -H32m -hisuf hi -fllvm -rtsopts -O2
RUNTEST_OPTS = -ghc-timing
==nofib== pidigits: time to compile Main follows...
/home/Andi/ghc_head/inplace/bin/ghc-stage2 -O2 -Rghc-timing -H32m -hisuf hi -fllvm -rtsopts -O2 -c Main.hs -o Main.o
ghc-stage2.exe: panic! (the 'impossible' happened)
(GHC version 8.5.20180401 for x86_64-unknown-mingw32):
Each block should be reachable from only one ProcPoint
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
<<ghc: 506688344 bytes, 156 GCs, 7738569/16639872 avg/max bytes residency (5 samples), 37M in use, 0.000 INIT (0.000 elapsed), 0.344 MUT (0.333 elapsed), 0.062 GC (0.112 elapsed) :ghc>>
make[1]: *** [../../mk/suffix.mk:23: Main.o] Error 1
Failed making all in pidigits: 1
make: *** [../mk/ghc-recurse.mk:69: all] Error 1
$ opt --version
LLVM (http://llvm.org/):
LLVM version 5.0.1
Optimized build.
Default target: x86_64-w64-windows-gnu
Host CPU: skylake
```
This is on commit 8b823f270e53627ddca1a993c05f1ab556742d96
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | --------------- |
| Version | |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (LLVM) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Building nofib using llvm and HEAD fails","status":"New","operating_system":"","component":"Compiler (LLVM)","related":[],"milestone":"8.4.2","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"\r\n{{{\r\n== make all ;\r\n in /home/Andi/ghc_head/nofib/shootout/pidigits\r\n------------------------------------------------------------------------\r\nHC = /home/Andi/ghc_head/inplace/bin/ghc-stage2\r\nHC_OPTS = -O2 -Rghc-timing -H32m -hisuf hi -fllvm -rtsopts -O2\r\nRUNTEST_OPTS = -ghc-timing\r\n==nofib== pidigits: time to compile Main follows...\r\n/home/Andi/ghc_head/inplace/bin/ghc-stage2 -O2 -Rghc-timing -H32m -hisuf hi -fllvm -rtsopts -O2 -c Main.hs -o Main.o\r\nghc-stage2.exe: panic! (the 'impossible' happened)\r\n (GHC version 8.5.20180401 for x86_64-unknown-mingw32):\r\n Each block should be reachable from only one ProcPoint\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n\r\n<<ghc: 506688344 bytes, 156 GCs, 7738569/16639872 avg/max bytes residency (5 samples), 37M in use, 0.000 INIT (0.000 elapsed), 0.344 MUT (0.333 elapsed), 0.062 GC (0.112 elapsed) :ghc>>\r\nmake[1]: *** [../../mk/suffix.mk:23: Main.o] Error 1\r\nFailed making all in pidigits: 1\r\nmake: *** [../mk/ghc-recurse.mk:69: all] Error 1\r\n\r\n$ opt --version\r\nLLVM (http://llvm.org/):\r\n LLVM version 5.0.1\r\n Optimized build.\r\n Default target: x86_64-w64-windows-gnu\r\n Host CPU: skylake\r\n\r\n}}}\r\n\r\nThis is on commit 8b823f270e53627ddca1a993c05f1ab556742d96\r\n","type_of_failure":"OtherFailure","blocking":[]} -->⊥