externally_available.ll 318 B

12345678910111213141516
  1. ; RUN: opt < %s -inline -constprop -S > %t
  2. ; RUN: not grep test_function %t
  3. ; RUN: grep "ret i32 5" %t
  4. ; test_function should not be emitted to the .s file.
  5. define available_externally i32 @test_function() {
  6. ret i32 4
  7. }
  8. define i32 @result() {
  9. %A = call i32 @test_function()
  10. %B = add i32 %A, 1
  11. ret i32 %B
  12. }