mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
f6e5cbec4b
This patch enables printing of constants to see which instructions were constant-folded. Needed for tests and better visiual analysis of inliner's work. Reviewers: apilipenko, mtrofin, davidxl, fedor.sergeev Reviewed By: mtrofin Differential Revision: https://reviews.llvm.org/D81024
16 lines
391 B
LLVM
16 lines
391 B
LLVM
; RUN: opt < %s -passes="print<inline-cost>" 2>&1 | FileCheck %s
|
|
|
|
; CHECK-LABEL: @test()
|
|
; CHECK: cost before = {{.*}}, cost after = {{.*}}, threshold before = {{.*}}, threshold after = {{.*}}, cost delta = {{.*}}, simplified to i1 false
|
|
; CHECK: %1 = icmp eq i32 4, 5
|
|
|
|
define i32 @test() {
|
|
%1 = icmp eq i32 4, 5
|
|
ret i32 0
|
|
}
|
|
|
|
define void @main() {
|
|
%1 = call i32 @test()
|
|
ret void
|
|
}
|