-
Notifications
You must be signed in to change notification settings - Fork 18.1k
[codegen]Ensure __builtin_trap() has an unreachable #197789
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
Changes from 4 commits
48bc3a4
b7c1970
d2c974b
ca1be1c
b77cd81
3d12f1f
c9f22a2
7b1f03e
d647066
07e1d13
4bbb5bf
50104d3
6eee744
27bf8c6
7338ad8
c0b380f
8580c7f
a785ecc
cefbe0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,10 +100,9 @@ void something_else_again() { | |
| // CHECK: load ptr, ptr | ||
| // CHECK: %[[AG:.*]] = load ptr, ptr | ||
| // CHECK-NEXT: call void %[[AG]](ptr {{.*}}) #[[ATTR1]] | ||
| // CHECK: call void @llvm.trap() #[[ATTR0]] | ||
| // CHECK: call void @llvm.debugtrap() #[[ATTR0]] | ||
| // CHECK: call void @llvm.trap() #[[ATTR0]] | ||
| // CHECK: call void @_ZN1AD1Ev(ptr {{.*}}) #[[ATTR1]] | ||
| // CHECK: call void @llvm.trap() #[[ATTR8:[0-9]+]] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This breaks what this is supposed to be testing. Please split the call to __builtin_trap() into a separate function.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
| // CHECK: unreachable | ||
|
|
||
| // CHECK-DAG: attributes #[[ATTR0]] = {{{.*}}nomerge{{.*}}} | ||
| // CHECK-DAG: attributes #[[ATTR1]] = {{{.*}}nomerge{{.*}}} | ||
| // CHECK-DAG attributes #[[ATTR8]] = { nomerge noreturn nounwind } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,7 @@ void call_var_args() { | |
| } | ||
|
|
||
| // CHECK-LABEL: define dso_local void @"?call_var_args@@YAXXZ"() | ||
| // FIXME all of these are after the trap so they should be gone. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is something we plan to fix... not sure the FIXME is useful. |
||
| // CHECK: call void {{.*varargs_zero.*}}(ptr inalloca(<{ %struct.A }>) %{{.*}}) | ||
| // CHECK: call void {{.*varargs_one.*}}(ptr inalloca(<{ i32, %struct.A }>) %{{.*}}) | ||
| // CHECK: call void {{.*varargs_two.*}}(ptr inalloca(<{ i32, i32, %struct.A }>) %{{.*}}) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.