[llvm-commits] CVS: llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll 2007-03-24-cntlzd.ll bswap-load-store.ll

Reid Spencer reid at x10sys.com
Sun Apr 1 00:36:50 PDT 2007



Changes in directory llvm/test/CodeGen/PowerPC:

2006-07-19-stwbrx-crash.ll updated: 1.2 -> 1.3
2007-03-24-cntlzd.ll updated: 1.1 -> 1.2
bswap-load-store.ll updated: 1.2 -> 1.3
---
Log message:

For PR1297: http://llvm.org/PR1297 :
Update these test cases to use proper signatures for bswap which is now
and overloaded intrinsic. Its name must be of the form llvm.bswap.i32.i32
since both the parameter and the result or of type "iAny". Also, the
bit counting intrinsics changed to always return i32.


---
Diffs of the changes:  (+12 -14)

 2006-07-19-stwbrx-crash.ll |    4 ++--
 2007-03-24-cntlzd.ll       |   10 ++++------
 bswap-load-store.ll        |   12 ++++++------
 3 files changed, 12 insertions(+), 14 deletions(-)


Index: llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll
diff -u llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll:1.2 llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll:1.3
--- llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll:1.2	Fri Dec  1 22:23:08 2006
+++ llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll	Sun Apr  1 02:36:28 2007
@@ -2,9 +2,9 @@
 
 void %img2buf(int %symbol_size_in_bytes, ushort* %ui16) {
 	%tmp93 = load ushort* null		; <ushort> [#uses=1]
-	%tmp99 = call ushort %llvm.bswap.i16( ushort %tmp93 )		; <ushort> [#uses=1]
+	%tmp99 = call ushort %llvm.bswap.i16.i16( ushort %tmp93 )		; <ushort> [#uses=1]
 	store ushort %tmp99, ushort* %ui16
 	ret void
 }
 
-declare ushort %llvm.bswap.i16(ushort)
+declare ushort %llvm.bswap.i16.i16(ushort)


Index: llvm/test/CodeGen/PowerPC/2007-03-24-cntlzd.ll
diff -u llvm/test/CodeGen/PowerPC/2007-03-24-cntlzd.ll:1.1 llvm/test/CodeGen/PowerPC/2007-03-24-cntlzd.ll:1.2
--- llvm/test/CodeGen/PowerPC/2007-03-24-cntlzd.ll:1.1	Sat Mar 24 23:43:51 2007
+++ llvm/test/CodeGen/PowerPC/2007-03-24-cntlzd.ll	Sun Apr  1 02:36:28 2007
@@ -2,12 +2,10 @@
 
 define i32 @_ZNK4llvm5APInt17countLeadingZerosEv(i64 *%t) {
         %tmp19 = load i64* %t
-        %tmp23 = tail call i64 @llvm.ctlz.i64( i64 %tmp19 )             ; <i64> [#uses=1]
-        %tmp2324 = trunc i64 %tmp23 to i32              ; <i32> [#uses=1]
-        %tmp89 = add i32 %tmp2324, -64          ; <i32> [#uses=1]
-        %tmp90 = add i32 %tmp89, 0              ; <i32> [#uses=1]
+        %tmp23 = tail call i32 @llvm.ctlz.i64( i64 %tmp19 )             ; <i64> [#uses=1]
+        %tmp89 = add i32 %tmp23, -64          ; <i32> [#uses=1]
+        %tmp90 = add i32 %tmp89, 0            ; <i32> [#uses=1]
         ret i32 %tmp90
 }
 
-declare i64 @llvm.ctlz.i64(i64)
-
+declare i32 @llvm.ctlz.i64(i64)


Index: llvm/test/CodeGen/PowerPC/bswap-load-store.ll
diff -u llvm/test/CodeGen/PowerPC/bswap-load-store.ll:1.2 llvm/test/CodeGen/PowerPC/bswap-load-store.ll:1.3
--- llvm/test/CodeGen/PowerPC/bswap-load-store.ll:1.2	Fri Dec  1 22:23:08 2006
+++ llvm/test/CodeGen/PowerPC/bswap-load-store.ll	Sun Apr  1 02:36:28 2007
@@ -8,7 +8,7 @@
 void %STWBRX(uint %i, sbyte* %ptr, int %off) {
 	%tmp1 = getelementptr sbyte* %ptr, int %off
 	%tmp1 = cast sbyte* %tmp1 to uint*
-	%tmp13 = tail call uint %llvm.bswap.i32(uint %i)
+	%tmp13 = tail call uint %llvm.bswap.i32.i32(uint %i)
 	store uint %tmp13, uint* %tmp1
 	ret void
 }
@@ -17,14 +17,14 @@
 	%tmp1 = getelementptr sbyte* %ptr, int %off
 	%tmp1 = cast sbyte* %tmp1 to uint*		
 	%tmp = load uint* %tmp1		
-	%tmp14 = tail call uint %llvm.bswap.i32( uint %tmp )
+	%tmp14 = tail call uint %llvm.bswap.i32.i32( uint %tmp )
 	ret uint %tmp14
 }
 
 void %STHBRX(ushort %s, sbyte* %ptr, int %off) {
 	%tmp1 = getelementptr sbyte* %ptr, int %off
 	%tmp1 = cast sbyte* %tmp1 to ushort*
-	%tmp5 = call ushort %llvm.bswap.i16( ushort %s )
+	%tmp5 = call ushort %llvm.bswap.i16.i16( ushort %s )
 	store ushort %tmp5, ushort* %tmp1
 	ret void
 }
@@ -33,10 +33,10 @@
 	%tmp1 = getelementptr sbyte* %ptr, int %off
 	%tmp1 = cast sbyte* %tmp1 to ushort*
 	%tmp = load ushort* %tmp1
-	%tmp6 = call ushort %llvm.bswap.i16(ushort %tmp)
+	%tmp6 = call ushort %llvm.bswap.i16.i16(ushort %tmp)
 	ret ushort %tmp6
 }
 
-declare uint %llvm.bswap.i32(uint)
+declare uint %llvm.bswap.i32.i32(uint)
 
-declare ushort %llvm.bswap.i16(ushort)
+declare ushort %llvm.bswap.i16.i16(ushort)






More information about the llvm-commits mailing list