[llvm-commits] [llvm] r147243 - /llvm/trunk/test/CodeGen/X86/lzcnt.ll

Chandler Carruth chandlerc at gmail.com
Sat Dec 24 02:55:43 PST 2011


Author: chandlerc
Date: Sat Dec 24 04:55:42 2011
New Revision: 147243

URL: http://llvm.org/viewvc/llvm-project?rev=147243&view=rev
Log:
Cleanup this test a bit, sorting things and grouping them more clearly.

Modified:
    llvm/trunk/test/CodeGen/X86/lzcnt.ll

Modified: llvm/trunk/test/CodeGen/X86/lzcnt.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/lzcnt.ll?rev=147243&r1=147242&r2=147243&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/lzcnt.ll (original)
+++ llvm/trunk/test/CodeGen/X86/lzcnt.ll Sat Dec 24 04:55:42 2011
@@ -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 @@
 ; 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
-





More information about the llvm-commits mailing list