diff llvm/test/Transforms/Reassociate/reassociate-deadinst.ll @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 2e18cbf3894f
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/llvm/test/Transforms/Reassociate/reassociate-deadinst.ll	Thu Feb 13 15:10:13 2020 +0900
@@ -0,0 +1,16 @@
+; RUN: opt < %s -inline -functionattrs -reassociate -S | FileCheck %s
+
+; CHECK-NOT: func1
+; 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 }