Closed Quuxplusone closed 10 years ago
FYI it is also reproducible on i686-cygwin.
Attached ARMAsmBackend-265222.sh
(819 bytes, application/x-shellscript): Test compile line.
Attached ARMAsmBackend-265222.cpp.bz2
(524301 bytes, application/x-bzip): bz2 source
Attached test2.ll
(1608 bytes, application/octet-stream): reduced testcase
FYI, it seems this issue doesn't happen on release_34.
With bisecting, r195406 was the first bad commit. I am not sure if it were culprit.
This is only a change to the cost model. It must be triggering another bug. The switch in the test case looks like something that we may not handle right. Is there a backtrack to the crash ? I am traveling now but I hope to look at it later today.
(In reply to comment #5)
> This is only a change to the cost model. It must be triggering another bug.
> The switch in the test case looks like something that we may not handle
> right. Is there a backtrack to the crash ? I am traveling now but I hope to
> look at it later today.
No, it produces invalid IR and the verifier is the one that complains about it.
It looks like the switch is giving us problems:
PHI node has multiple entries for the same basic block with different incoming
values!
%retval.0 = phi i32 [ %or11, %sw.bb2 ], [ %3, %entry ], [ %4, %entry ]
label %entry
%4 = extractelement <2 x i32> %2, i32 0
%3 = extractelement <2 x i32> %2, i32 0
The problem is that we RAUW some values in two different places and we end up
breaking a PHINode that uses these values:
%9 = extractelement <2 x i32> %3, i32 0
%8 = extractelement <2 x i32> %3, i32 0
..
%retval.0 = phi i32 [ %or11, %sw.bb2 ], [ %3, %entry ], [ %4, %entry ]
%3 is replaced with %9, %4 is replaced with %8, which are the same but the
verifier does not know that.
CSE-ing the extracts solves the problem. I plan to commit a fix soon.
Fixed in 195773.
Tested in 195782.
I am working on a fix for the ASan bot.
Fixed ASan problem and the test case in r195791.
ARMAsmBackend-265222.sh
(819 bytes, application/x-shellscript)ARMAsmBackend-265222.cpp.bz2
(524301 bytes, application/x-bzip)test2.ll
(1608 bytes, application/octet-stream)