From e264f62ca09a8f65c87a46d562a4d0f9ec5d457e Mon Sep 17 00:00:00 2001 From: Shih-wei Liao Date: Wed, 10 Feb 2010 11:10:31 -0800 Subject: Check in LLVM r95781. --- test/CodeGen/PowerPC/subc.ll | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/CodeGen/PowerPC/subc.ll (limited to 'test/CodeGen/PowerPC/subc.ll') diff --git a/test/CodeGen/PowerPC/subc.ll b/test/CodeGen/PowerPC/subc.ll new file mode 100644 index 0000000..5914dca --- /dev/null +++ b/test/CodeGen/PowerPC/subc.ll @@ -0,0 +1,25 @@ +; All of these should be codegen'd without loading immediates +; RUN: llc < %s -march=ppc32 -o %t +; RUN: grep subfc %t | count 1 +; RUN: grep subfe %t | count 1 +; RUN: grep subfze %t | count 1 +; RUN: grep subfme %t | count 1 +; RUN: grep subfic %t | count 2 + +define i64 @sub_ll(i64 %a, i64 %b) { +entry: + %tmp.2 = sub i64 %a, %b ; [#uses=1] + ret i64 %tmp.2 +} + +define i64 @sub_l_5(i64 %a) { +entry: + %tmp.1 = sub i64 5, %a ; [#uses=1] + ret i64 %tmp.1 +} + +define i64 @sub_l_m5(i64 %a) { +entry: + %tmp.1 = sub i64 -5, %a ; [#uses=1] + ret i64 %tmp.1 +} -- cgit v1.1