[llvm] a5046f7 - [NFC][PowerPC] Add tests in constants-i64.ll.

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 06:14:50 PDT 2020


Author: Esme-Yi
Date: 2020-09-07T13:14:00Z
New Revision: a5046f7acece0085cb6f457da7ebca34d267155a

URL: https://github.com/llvm/llvm-project/commit/a5046f7acece0085cb6f457da7ebca34d267155a
DIFF: https://github.com/llvm/llvm-project/commit/a5046f7acece0085cb6f457da7ebca34d267155a.diff

LOG: [NFC][PowerPC] Add tests in constants-i64.ll.

Added: 
    

Modified: 
    llvm/test/CodeGen/PowerPC/constants-i64.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/PowerPC/constants-i64.ll b/llvm/test/CodeGen/PowerPC/constants-i64.ll
index fa45dd19c165..956845f5a5b3 100644
--- a/llvm/test/CodeGen/PowerPC/constants-i64.ll
+++ b/llvm/test/CodeGen/PowerPC/constants-i64.ll
@@ -80,5 +80,48 @@ entry:
 ; CHECK: blr
 }
 
-attributes #0 = { nounwind readnone }
+define i64 @cn32_1() #0 {
+entry:
+  ret i64 3900000000
+
+; CHECK-LABEL: @cn32_1
+; CHECK: lis [[REG1:[0-9]+]], 232
+; CHECK: ori [[REG2:[0-9]+]], [[REG1]], 30023
+; CHECK: sldi 3, [[REG1]], 8
+; CHECK: blr
+}
 
+define i32 @cn32_1_i32() #0 {
+entry:
+  ret i32 -394967296
+
+; CHECK-LABEL: @cn32_1_i32
+; CHECK: lis [[REG1:[0-9]+]], 232
+; CHECK: ori [[REG2:[0-9]+]], [[REG1]], 30023
+; CHECK: sldi 3, [[REG1]], 8
+; CHECK: blr
+}
+
+define i64 @cn32_2() #0 {
+entry:
+  ret i64 4294967295
+
+; CHECK-LABEL: @cn32_2
+; CHECK: li [[REG1:[0-9]+]], 0
+; CHECK: oris [[REG2:[0-9]+]], [[REG1]], 65535
+; CHECK: ori [[REG2:[0-9]+]], [[REG1]], 65535
+; CHECK: blr
+}
+
+define i32 @cn32_2_i32() #0 {
+entry:
+  ret i32 -1
+
+; CHECK-LABEL: @cn32_2_i32
+; CHECK: li [[REG1:[0-9]+]], 0
+; CHECK: oris [[REG2:[0-9]+]], [[REG1]], 65535
+; CHECK: ori [[REG2:[0-9]+]], [[REG1]], 65535
+; CHECK: blr
+}
+
+attributes #0 = { nounwind readnone }


        


More information about the llvm-commits mailing list