-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
invoke has no landing pad after codegen #1811
Comments
Is this a new regression? |
I don't know. |
Tail merging, mine. |
Wrong again, this fails identically with tail merging turned off. Nor is it branch folding. I do not |
Dale, this is EH issue. The problem is: |
Extended Description
In the testcase there are two calls to @__cxa_throw,
one of which is an invoke the other a normal call.
[Only the invoke one should be called when the program
is run].
After codegen
llc -enable-eh -asm-verbose e.bc
there is only one call to @__cxa_throw but it
is the wrong one! First of all, from the assembler
comment (#finally) you can see that it is the normal
call version that got put in (the other is in finally.i):
.LBB2_1: #finally
movl $_ZTI1A, 4(%esp)
movl $_ZN1AD1Ev, 8(%esp)
movl %esi, (%esp)
call __cxa_throw
.LBB2_2: #unwind
Secondly, in the exception handling table there is no
landing pad for this code range, there is only
which does not cover this.
My guess is that codegen cleverly saw that it could collapse
the two calls to @__cxa_throw into one call, thinking that they
were equivalent, without noticing that they differed in that
one was an invoke.
The text was updated successfully, but these errors were encountered: