#4992: LLVM trashes registers for primitive calls
--------------------------------+-------------------------------------------
    Reporter:  scpmw            |        Owner:  davidterei@…        
        Type:  bug              |       Status:  patch               
    Priority:  normal           |    Milestone:                      
   Component:  Compiler (LLVM)  |      Version:  7.1                 
    Keywords:                   |     Testcase:                      
   Blockedby:                   |   Difficulty:                      
          Os:  Linux            |     Blocking:                      
Architecture:  x86_64 (amd64)   |      Failure:  Runtime crash       
--------------------------------+-------------------------------------------

Comment(by scpmw):

 Okay, seems you are indeed right. Once registers are actually live, they
 get saved and the code does what it should.

 The root cause here was my GHC tinkering, which happened to generate
 primitive calls without paying attention to live variables - which is in
 itself perfectly safe except that LLVM codegen counts on this unnecessary
 register saving taking place in order to produce correct code. Whew,
 didn't expect that.

 Apologies for the confusion. I guess this can be closed, as the upsides
 have now been reduced to
 just less redundant code getting generated.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4992#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to