LLVM assertion failure with -O1 #27055
Comments
|
Dumped the module that instcombine is failing on: https://gist.github.com/JeffBezanson/09ffede3648a980ba397b4f5435392c1 |
|
Aha, I think I just need to run the PropagateJuliaAddrspaces pass before SROA. |
While that may perhaps fix it, LLVM should not crash if we don't run that pass. It's an optimization pass, not a lowering pass. We should try to fix the LLVM bug. |
|
I have a promising lead: it looks like InstCombine's code for marking GEPs as inbounds incorrectly skips over addrspace casts, because the code for the prior transform reassigns a variable it uses. |
|
Upstream patch submitted: https://reviews.llvm.org/D46722 |
Summary: Part of the InstCombine code for simplifying GEPs looks through addrspacecasts. However, this was done by updating a variable also used by the next transformation, for marking GEPs as inbounds. This led to replacing a GEP with a similar instruction in a different addrspace, which caused an assertion failure in RAUW. This caused julia issue JuliaLang/julia#27055 Patch by Jeff Bezanson <jeff@juliacomputing.com> Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D46722
Summary: Part of the InstCombine code for simplifying GEPs looks through addrspacecasts. However, this was done by updating a variable also used by the next transformation, for marking GEPs as inbounds. This led to replacing a GEP with a similar instruction in a different addrspace, which caused an assertion failure in RAUW. This caused julia issue JuliaLang/julia#27055 Patch by Jeff Bezanson <jeff@juliacomputing.com> Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D46722
Summary: Part of the InstCombine code for simplifying GEPs looks through addrspacecasts. However, this was done by updating a variable also used by the next transformation, for marking GEPs as inbounds. This led to replacing a GEP with a similar instruction in a different addrspace, which caused an assertion failure in RAUW. This caused julia issue JuliaLang/julia#27055 Patch by Jeff Bezanson <jeff@juliacomputing.com> Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D46722 llvm-svn=332302
Summary: Part of the InstCombine code for simplifying GEPs looks through addrspacecasts. However, this was done by updating a variable also used by the next transformation, for marking GEPs as inbounds. This led to replacing a GEP with a similar instruction in a different addrspace, which caused an assertion failure in RAUW. This caused julia issue JuliaLang/julia#27055 Patch by Jeff Bezanson <jeff@juliacomputing.com> Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D46722 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332302 91177308-0d34-0410-b5e6-96231b3b80d8
|
Will be part of the next BB release and I will create a PR for this repo as well. |
------------------------------------------------------------------------ r332302 | kfischer | 2018-05-14 15:05:01 -0700 (Mon, 14 May 2018) | 15 lines [InstCombine] fix crash due to ignored addrspacecast Summary: Part of the InstCombine code for simplifying GEPs looks through addrspacecasts. However, this was done by updating a variable also used by the next transformation, for marking GEPs as inbounds. This led to replacing a GEP with a similar instruction in a different addrspace, which caused an assertion failure in RAUW. This caused julia issue JuliaLang/julia#27055 Patch by Jeff Bezanson <jeff@juliacomputing.com> Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D46722 ------------------------------------------------------------------------ llvm-svn=333477
------------------------------------------------------------------------ r332302 | kfischer | 2018-05-14 15:05:01 -0700 (Mon, 14 May 2018) | 15 lines [InstCombine] fix crash due to ignored addrspacecast Summary: Part of the InstCombine code for simplifying GEPs looks through addrspacecasts. However, this was done by updating a variable also used by the next transformation, for marking GEPs as inbounds. This led to replacing a GEP with a similar instruction in a different addrspace, which caused an assertion failure in RAUW. This caused julia issue JuliaLang/julia#27055 Patch by Jeff Bezanson <jeff@juliacomputing.com> Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D46722 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@333477 91177308-0d34-0410-b5e6-96231b3b80d8
------------------------------------------------------------------------ r332302 | kfischer | 2018-05-14 15:05:01 -0700 (Mon, 14 May 2018) | 15 lines [InstCombine] fix crash due to ignored addrspacecast Summary: Part of the InstCombine code for simplifying GEPs looks through addrspacecasts. However, this was done by updating a variable also used by the next transformation, for marking GEPs as inbounds. This led to replacing a GEP with a similar instruction in a different addrspace, which caused an assertion failure in RAUW. This caused julia issue JuliaLang/julia#27055 Patch by Jeff Bezanson <jeff@juliacomputing.com> Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D46722 ------------------------------------------------------------------------
------------------------------------------------------------------------ r332302 | kfischer | 2018-05-14 15:05:01 -0700 (Mon, 14 May 2018) | 15 lines [InstCombine] fix crash due to ignored addrspacecast Summary: Part of the InstCombine code for simplifying GEPs looks through addrspacecasts. However, this was done by updating a variable also used by the next transformation, for marking GEPs as inbounds. This led to replacing a GEP with a similar instruction in a different addrspace, which caused an assertion failure in RAUW. This caused julia issue JuliaLang/julia#27055 Patch by Jeff Bezanson <jeff@juliacomputing.com> Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D46722 ------------------------------------------------------------------------
------------------------------------------------------------------------ r332302 | kfischer | 2018-05-14 15:05:01 -0700 (Mon, 14 May 2018) | 15 lines [InstCombine] fix crash due to ignored addrspacecast Summary: Part of the InstCombine code for simplifying GEPs looks through addrspacecasts. However, this was done by updating a variable also used by the next transformation, for marking GEPs as inbounds. This led to replacing a GEP with a similar instruction in a different addrspace, which caused an assertion failure in RAUW. This caused julia issue JuliaLang/julia#27055 Patch by Jeff Bezanson <jeff@juliacomputing.com> Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D46722 ------------------------------------------------------------------------ llvm-svn=333477
------------------------------------------------------------------------ r332302 | kfischer | 2018-05-14 15:05:01 -0700 (Mon, 14 May 2018) | 15 lines [InstCombine] fix crash due to ignored addrspacecast Summary: Part of the InstCombine code for simplifying GEPs looks through addrspacecasts. However, this was done by updating a variable also used by the next transformation, for marking GEPs as inbounds. This led to replacing a GEP with a similar instruction in a different addrspace, which caused an assertion failure in RAUW. This caused julia issue JuliaLang/julia#27055 Patch by Jeff Bezanson <jeff@juliacomputing.com> Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D46722 ------------------------------------------------------------------------ llvm-svn: 333477
Summary: Part of the InstCombine code for simplifying GEPs looks through addrspacecasts. However, this was done by updating a variable also used by the next transformation, for marking GEPs as inbounds. This led to replacing a GEP with a similar instruction in a different addrspace, which caused an assertion failure in RAUW. This caused julia issue JuliaLang/julia#27055 Patch by Jeff Bezanson <jeff@juliacomputing.com> Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D46722 llvm-svn: 332302
I get this running the
numberstest with -O1:Will try to investigate.
The text was updated successfully, but these errors were encountered: