| ; RUN: llc < %s -stop-after=finalize-isel -mtriple=x86_64-unknown-linux - | FileCheck %s --implicit-check-not FAKE_USE |
| ; Fake uses following tail calls should be pulled in front |
| ; of the TCRETURN instruction. Fake uses using something defined by |
| ; the tail call or after it should be suppressed. |
| define void @bar(i32 %v) optdebug { |
| %call = tail call i32 @_Z3fooi(i32 %v) |
| %mul = mul nsw i32 %call, 3 |
| notail call void (...) @llvm.fake.use(i32 %mul) |
| notail call void (...) @llvm.fake.use(i32 %call) |
| notail call void (...) @llvm.fake.use(i32 %v) |
| define i32 @baz(i32 %v) optdebug { |
| %call = tail call i32 @_Z3fooi(i32 %v) |
| notail call void (...) @llvm.fake.use(i32 %v) |
| declare i32 @_Z3fooi(i32) local_unnamed_addr |