@@ -310,11 +310,26 @@ define void @has_musttail_calls() {
310310 musttail call void @bar ()
311311 ret void
312312}
313+
314+ define void @does_not_return () noreturn {
315+ ; INSTRUMENT-LABEL: define void @does_not_return(
316+ ; INSTRUMENT-SAME: ) #[[ATTR0:[0-9]+]] {
317+ ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @does_not_return, i64 742261418966908927, i32 1, i32 0)
318+ ; INSTRUMENT-NEXT: unreachable
319+ ;
320+ ; LOWERING-LABEL: define void @does_not_return(
321+ ; LOWERING-SAME: ) #[[ATTR0:[0-9]+]] !guid [[META8:![0-9]+]] {
322+ ; LOWERING-NEXT: unreachable
323+ ;
324+ unreachable
325+ }
313326;.
314- ; LOWERING: attributes #[[ATTR0:[0-9]+]] = { nounwind }
315- ; LOWERING: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
327+ ; LOWERING: attributes #[[ATTR0]] = { noreturn }
328+ ; LOWERING: attributes #[[ATTR1:[0-9]+]] = { nounwind }
329+ ; LOWERING: attributes #[[ATTR2:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
316330;.
317- ; INSTRUMENT: attributes #[[ATTR0:[0-9]+]] = { nounwind }
331+ ; INSTRUMENT: attributes #[[ATTR0]] = { noreturn }
332+ ; INSTRUMENT: attributes #[[ATTR1:[0-9]+]] = { nounwind }
318333;.
319334; LOWERING: [[META0]] = !{i64 6699318081062747564}
320335; LOWERING: [[META1]] = !{i64 4909520559318251808}
@@ -324,4 +339,5 @@ define void @has_musttail_calls() {
324339; LOWERING: [[META5]] = !{i64 5458232184388660970}
325340; LOWERING: [[META6]] = !{i64 -3771893999295659109}
326341; LOWERING: [[META7]] = !{i64 -4680624981836544329}
342+ ; LOWERING: [[META8]] = !{i64 5519225910966780583}
327343;.
0 commit comments