-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion `!isa<CallBrInst>(Preds[i]->getTerminator()) && "Cannot split an edge from a CallBrInst"' failed. #896
Comments
This is still reproducible on ToT LLVM and Linux. I'll reduce this down and report it upstream. |
This is a regression in 10.0.0, as 9.0.1 is fine. I'm running a bisect now. creduce spits out:
|
Run the below with
|
I think this is the fix:
|
Bisect points to llvm/llvm-project@cc95a45, don’t know if that is accurate or I took a wrong turn somewhere (I tried to do it automatically and might have messed something up). I can try that patch later. |
I think llvm/llvm-project@cc95a45 just exposed the issue. The change of the |
This is weird, I cannot reproduce on master/ToT llvm. Is this only reproducible in clang-10? |
I could reproduce it with ToT LLVM this morning. |
$ make CC=clang i386_defconfig
$ make CC=clang drivers/char/random.o
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
CC drivers/char/random.o
$ git show -1 | head -n1
commit ca7e1fd1026c5af6a533b4b5447e1d2f153e28f2
$ clang -O2 -no-integrated-as -march=i686 -m32 -c -o /dev/null tmp.c
$ echo $?
0 Compiler is haunted, 👻 , confirmed. |
$ opt -licm foo.ll -S
; ModuleID = 'foo.ll'
source_filename = "foo.ll"
target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128"
target triple = "i386-unknown-linux-gnu"
define dso_local i32 @j() local_unnamed_addr #0 {
entry:
br label %for.cond
for.cond: ; preds = %cond.true.i, %entry
callbr void asm sideeffect "", "X,~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@j, %for.end)) #1
to label %cond.true.i [label %for.end]
cond.true.i: ; preds = %for.cond
br i1 true, label %for.end, label %for.cond
for.end: ; preds = %cond.true.i, %for.cond
%asmresult1.i.i2 = phi i32 [ 0, %cond.true.i ], [ undef, %for.cond ]
ret i32 undef
}
attributes #0 = { "use-soft-float"="false" }
attributes #1 = { nounwind }
!llvm.ident = !{!0}
!0 = !{!"clang version 11.0.0 (https://github.com/llvm/llvm-project.git faf74f0b2b2e51989780a95d4f1466fd6e1beb80)"} in Bill's reproducer, there's a weird branch on |
Sorry, needs OpenMandriva’s https://github.com/OpenMandrivaAssociation/kernel-release-clang/blob/master/common.config |
I have a Clang built from yesterday: With @nathanchance's reproducer, I see the expected crash. |
|
thanks for the hot tipz, but I still cannot reproduce. I wonder if something covered this back up since yesterday, let me do some bisection. |
crashing at f5efa08247c7 (yesterday morning). Bisecting forward. |
Just tried TOT right now. Can confirm that it is passing again, so compiler isn't necessarily as haunted as previously indicated. 👻 |
Fixed by @gwelymernans two hours ago llvm/llvm-project@2fe4576 (without code review...) |
Notes to self:
before: callbr void asm sideeffect "", "X,~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@j, %for.end)) #1
to label %cond.true.i [label %for.end]
which produces: callbr void asm sideeffect "", "X,~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@j, %for.end)) #1
to label %cond.true.i [label %for.end.split.loop.exit1] which fails module verification because the indirect label list was updated but not the argument to the asm. We've had this issue in the past, but |
I've posted https://reviews.llvm.org/D74947 to demonstrate some breakage in If I remove the
|
This has been fixed in LLVM 11.0.0 and it was picked into LLVM 10.0.0: |
I'm compiling kernel-5.5.4 with LLVM/clang-10.0.x on i686
Build details and logs can be found here
https://abf.openmandriva.org/build_lists/709792
The text was updated successfully, but these errors were encountered: