From 7d6b58302a99180c216a9afa9f7e87240cf6fa30 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Tue, 27 Oct 2020 19:03:19 +0000 Subject: [PATCH] [llvm-reduce] Add test with some aliases. --- llvm/test/Reduce/remove-alias.ll | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 llvm/test/Reduce/remove-alias.ll diff --git a/llvm/test/Reduce/remove-alias.ll b/llvm/test/Reduce/remove-alias.ll new file mode 100644 index 0000000..02bbf54 --- /dev/null +++ b/llvm/test/Reduce/remove-alias.ll @@ -0,0 +1,37 @@ +; RUN: llvm-reduce --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t +; RUN: FileCheck --check-prefixes=CHECK-FINAL --input-file=%t %s + +; Test handling of 'alias'. + +; CHECK-INTERESTINGNESS: define void @fn3 + +; CHECK-FINAL: $a1 +; CHECK-FINAL: $a2 +; CHECK-FINAL: $a3 +; CHECK-FINAL: $a4 + +; CHECK-FINAL: define void @fn1 +; CHECK-FINAL: define void @fn2 +; CHECK-FINAL: define void @fn3 +; CHECK-FINAL: define void @fn4 + +@"$a1" = alias void (), void ()* @fn1 +@"$a2" = alias void (), void ()* @fn2 +@"$a3" = alias void (), void ()* @fn3 +@"$a4" = alias void (), void ()* @fn4 + +define void @fn1() { + ret void +} + +define void @fn2() { + ret void +} + +define void @fn3() { + ret void +} + +define void @fn4() { + ret void +} -- 2.7.4