[GHC] #9504: LLVM backend TBAA is too aggressive

#9504: LLVM backend TBAA is too aggressive -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (LLVM) | Version: 7.8.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Incorrect Blocked By: | result at runtime Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- At https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM/Alia... there is written
It [a memory load/store] is very rarely of the form: {{{ x = Sp + 8 I64[x] = ... }}} And when it is, 'it is' (unconfirmed) always deriving a "heap" pointer, "stack" pointers are always of the in-line variety.
In fact commit e10589a505b44f4f0394500c6a0d2db5baa7f3f4 treats any memory access through a Cmm local variable as having the "other" type, which cannot alias any non-"other" address. But it turns out that a Cmm local might be either an offset from Sp (#9125, though TBAA doesn't seem to have been the cause of the bad code there) or an offset from a Cmm global variable (#9308). In general, we don't know anything about what it might be so we should conservatively use the "top" "type". -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9504 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9504: LLVM backend TBAA is too aggressive -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (LLVM) | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: 9308 Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by erikd): * cc: erikd (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9504#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9504: LLVM backend TBAA is too aggressive -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (LLVM) | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: 9308 Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by michalt): * cc: michalt (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9504#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9504: LLVM backend TBAA is too aggressive -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (LLVM) | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: 9308 Related Tickets: | Differential Rev(s): D2758 Wiki Page: | -------------------------------------+------------------------------------- Changes (by dobenour): * differential: => D2758 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9504#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9504: LLVM backend TBAA is too aggressive -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (LLVM) | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: 9308 Related Tickets: | Differential Rev(s): Diff: 2758 Wiki Page: | -------------------------------------+------------------------------------- Changes (by dobenour): * differential: D2758 => Diff: 2758 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9504#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9504: LLVM backend TBAA is too aggressive -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (LLVM) | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: 9308 Related Tickets: | Differential Rev(s): Phab:2758 Wiki Page: | -------------------------------------+------------------------------------- Changes (by dobenour): * differential: Diff: 2758 => Phab:2758 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9504#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9504: LLVM backend TBAA is too aggressive -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler (LLVM) | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: 9308 Related Tickets: | Differential Rev(s): Phab:2758 Wiki Page: | -------------------------------------+------------------------------------- Changes (by dobenour): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9504#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9504: LLVM backend TBAA is too aggressive -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler (LLVM) | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: 9308 Related Tickets: | Differential Rev(s): Phab:D2758 Wiki Page: | -------------------------------------+------------------------------------- Changes (by dobenour): * differential: Phab:2758 => Phab:D2758 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9504#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9504: LLVM backend TBAA is too aggressive
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner:
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Compiler (LLVM) | Version: 7.8.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking: 9308
Related Tickets: | Differential Rev(s): Phab:D2758
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#9504: LLVM backend TBAA is too aggressive -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler (LLVM) | Version: 7.8.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: 9308 Related Tickets: | Differential Rev(s): Phab:D2758 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed * milestone: => 8.2.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9504#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC