mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
27f75460b8
Removing terminators will result in invalid IR, making further reductions pointless. I do not think there is any valid use case where we actually want to create invalid IR as part of a reduction. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D86210
20 lines
575 B
LLVM
20 lines
575 B
LLVM
; 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
|
|
}
|