aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-12-24 10:55:42 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-12-24 10:55:42 +0000
commitc08e57c7c9ebba27360d5e27f56a44bcaa963a52 (patch)
tree656f3ee47e6975e9c114b2d8456371210c1fbefb
parent43ea32ca042214c28b7abba9c10f470ac5ade405 (diff)
Cleanup this test a bit, sorting things and grouping them more clearly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147243 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/X86/lzcnt.ll38
1 files changed, 17 insertions, 21 deletions
diff --git a/test/CodeGen/X86/lzcnt.ll b/test/CodeGen/X86/lzcnt.ll
index adfc38b35e..c2b3e68cbd 100644
--- a/test/CodeGen/X86/lzcnt.ll
+++ b/test/CodeGen/X86/lzcnt.ll
@@ -1,14 +1,17 @@
; RUN: llc < %s -march=x86-64 -mattr=+lzcnt | FileCheck %s
-define i32 @t1(i32 %x) nounwind {
- %tmp = tail call i32 @llvm.ctlz.i32( i32 %x, i1 false )
- ret i32 %tmp
+declare i8 @llvm.ctlz.i8(i8, i1) nounwind readnone
+declare i16 @llvm.ctlz.i16(i16, i1) nounwind readnone
+declare i32 @llvm.ctlz.i32(i32, i1) nounwind readnone
+declare i64 @llvm.ctlz.i64(i64, i1) nounwind readnone
+
+define i8 @t1(i8 %x) nounwind {
+ %tmp = tail call i8 @llvm.ctlz.i8( i8 %x, i1 false )
+ ret i8 %tmp
; CHECK: t1:
-; CHECK: lzcntl
+; CHECK: lzcntw
}
-declare i32 @llvm.ctlz.i32(i32, i1) nounwind readnone
-
define i16 @t2(i16 %x) nounwind {
%tmp = tail call i16 @llvm.ctlz.i16( i16 %x, i1 false )
ret i16 %tmp
@@ -16,23 +19,16 @@ define i16 @t2(i16 %x) nounwind {
; CHECK: lzcntw
}
-declare i16 @llvm.ctlz.i16(i16, i1) nounwind readnone
-
-define i64 @t3(i64 %x) nounwind {
- %tmp = tail call i64 @llvm.ctlz.i64( i64 %x, i1 false )
- ret i64 %tmp
+define i32 @t3(i32 %x) nounwind {
+ %tmp = tail call i32 @llvm.ctlz.i32( i32 %x, i1 false )
+ ret i32 %tmp
; CHECK: t3:
-; CHECK: lzcntq
+; CHECK: lzcntl
}
-declare i64 @llvm.ctlz.i64(i64, i1) nounwind readnone
-
-define i8 @t4(i8 %x) nounwind {
- %tmp = tail call i8 @llvm.ctlz.i8( i8 %x, i1 false )
- ret i8 %tmp
+define i64 @t4(i64 %x) nounwind {
+ %tmp = tail call i64 @llvm.ctlz.i64( i64 %x, i1 false )
+ ret i64 %tmp
; CHECK: t4:
-; CHECK: lzcntw
+; CHECK: lzcntq
}
-
-declare i8 @llvm.ctlz.i8(i8, i1) nounwind readnone
-