llvm-for-llvmta/test/Reduce/do-not-remove-terminator.ll

20 lines
575 B
LLVM
Raw Permalink Normal View History

2022-04-25 10:02:23 +02:00
; RUN: llvm-reduce --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t
; RUN: cat %t | FileCheck --check-prefixes=CHECK-FINAL %s
; Make sure we do not remove the terminator of the entry block. The interesting
; check only requires the result to define the function @test.
; Test case for PR43798.
; CHECK-INTERESTINGNESS: define i32 @test
; CHECK-FINAL: define i32 @test
; CHECK-FINAL-NEXT: entry:
; CHECK-FINAL-NEXT: ret i32
define i32 @test(i32 %x) {
entry:
%add = add i32 %x, %x
ret i32 %add
}