1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/Transforms/Reassociate/reassociate-deadinst.ll
Fangrui Song e99730100e [Reassociate][test] Delete improper -NOT patterns to work with -enable-new-pm=1
The two tests rely on LegacyInlinerBase::doFinalization to remove
Function::isDefTriviallyDead() functions. The new PM does not have the behavior.
The -NEXT patterns checking the emptiness are actually sufficient.

Note, reassociate-deadinst.ll has become stale - it no longer catches
the problem r285380 intended. Unfortunately it is difficult to craft a
new test because it is actually pretty difficult to break it with
`MadeChange = true;` all over the file.
2020-10-28 23:59:11 -07:00

16 lines
342 B
LLVM

; RUN: opt < %s -inline -function-attrs -reassociate -S | FileCheck %s
; CHECK-LABEL: main
; CHECK-NEXT: ret void
define internal i16 @func1() noinline #0 {
ret i16 0
}
define void @main(i16 %argc, i16** %argv) #0 {
%_tmp0 = call i16 @func1()
%_tmp2 = zext i16 %_tmp0 to i32
ret void
}
attributes #0 = { minsize nounwind optsize }