#7297: LLVM incorrectly hoisting loads -----------------------------------------+---------------------------------- Reporter: dterei | Owner: dterei Type: bug | Status: new Priority: normal | Component: Compiler (LLVM) Version: 7.7 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Incorrect result at runtime | Testcase: 367_letnoescape Blockedby: | Blocking: Related: | -----------------------------------------+---------------------------------- test 367_letnoescape fails under LLVM as a load of the HpLim register is hoisted out of the loop. So yielding is never done.
What I am not sure about right now is the best way to fix. Loads in LLVM can be annotated in a few different ways to fix this and not sure which one is the most 'correct'. All the following work: * mark the load as volatile. (seems to give nicest code as well) * mark the load as atomic with either monotonic or seq_cst ordering. * mark the load as both volatile and atomic. This bug while only affecting a single test case seems very serious and potentially indicative of a large problem. How well are we communicating the load/store threaded semantics to LLVM? So making a bug for now as I don't know yet the best way to proceed without dedicating some time to reading LLVM docs and probably talking to the LLVM devs as the docs on the memory model are fairly confusing. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7297> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs