summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-12-12 11:59:10 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-12-12 11:59:10 +0000
commit6b0e34c445683bff74b7441a2c09d4730c264fb4 (patch)
treeb013834e6abb1738d1b845bc0e78acd20a1b57a2 /llvm/test/CodeGen/Mips
parentf13db84794db89552130c3b277039705c481e9bd (diff)
downloadbcm5719-llvm-6b0e34c445683bff74b7441a2c09d4730c264fb4.tar.gz
bcm5719-llvm-6b0e34c445683bff74b7441a2c09d4730c264fb4.zip
Manually upgrade the test suite to specify the flag to cttz and ctlz.
I followed three heuristics for deciding whether to set 'true' or 'false': - Everything target independent got 'true' as that is the expected common output of the GCC builtins. - If the target arch only has one way of implementing this operation, set the flag in the way that exercises the most of codegen. For most architectures this is also the likely path from a GCC builtin, with 'true' being set. It will (eventually) require lowering away that difference, and then lowering to the architecture's operation. - Otherwise, set the flag differently dependending on which target operation should be tested. Let me know if anyone has any issue with this pattern or would like specific tests of another form. This should allow the x86 codegen to just iteratively improve as I teach the backend how to differentiate between the two forms, and everything else should remain exactly the same. llvm-svn: 146370
Diffstat (limited to 'llvm/test/CodeGen/Mips')
-rw-r--r--llvm/test/CodeGen/Mips/2008-08-08-ctlz.ll4
-rw-r--r--llvm/test/CodeGen/Mips/2010-11-09-CountLeading.ll10
-rw-r--r--llvm/test/CodeGen/Mips/mips64instrs.ll6
3 files changed, 10 insertions, 10 deletions
diff --git a/llvm/test/CodeGen/Mips/2008-08-08-ctlz.ll b/llvm/test/CodeGen/Mips/2008-08-08-ctlz.ll
index 52201836526..abd61de5a8d 100644
--- a/llvm/test/CodeGen/Mips/2008-08-08-ctlz.ll
+++ b/llvm/test/CodeGen/Mips/2008-08-08-ctlz.ll
@@ -3,8 +3,8 @@
define i32 @A0(i32 %u) nounwind {
entry:
; CHECK: clz
- call i32 @llvm.ctlz.i32( i32 %u )
+ call i32 @llvm.ctlz.i32( i32 %u, i1 true )
ret i32 %0
}
-declare i32 @llvm.ctlz.i32(i32) nounwind readnone
+declare i32 @llvm.ctlz.i32(i32, i1) nounwind readnone
diff --git a/llvm/test/CodeGen/Mips/2010-11-09-CountLeading.ll b/llvm/test/CodeGen/Mips/2010-11-09-CountLeading.ll
index c592b311782..6174500d3e0 100644
--- a/llvm/test/CodeGen/Mips/2010-11-09-CountLeading.ll
+++ b/llvm/test/CodeGen/Mips/2010-11-09-CountLeading.ll
@@ -3,16 +3,16 @@
; CHECK: clz $2, $4
define i32 @t1(i32 %X) nounwind readnone {
entry:
- %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %X)
+ %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %X, i1 true)
ret i32 %tmp1
}
-declare i32 @llvm.ctlz.i32(i32) nounwind readnone
+declare i32 @llvm.ctlz.i32(i32, i1) nounwind readnone
; CHECK: clz $2, $4
define i32 @t2(i32 %X) nounwind readnone {
entry:
- %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %X)
+ %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %X, i1 true)
ret i32 %tmp1
}
@@ -20,7 +20,7 @@ entry:
define i32 @t3(i32 %X) nounwind readnone {
entry:
%neg = xor i32 %X, -1
- %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %neg)
+ %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %neg, i1 true)
ret i32 %tmp1
}
@@ -28,6 +28,6 @@ entry:
define i32 @t4(i32 %X) nounwind readnone {
entry:
%neg = xor i32 %X, -1
- %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %neg)
+ %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %neg, i1 true)
ret i32 %tmp1
}
diff --git a/llvm/test/CodeGen/Mips/mips64instrs.ll b/llvm/test/CodeGen/Mips/mips64instrs.ll
index 9bc178c63d4..04183114905 100644
--- a/llvm/test/CodeGen/Mips/mips64instrs.ll
+++ b/llvm/test/CodeGen/Mips/mips64instrs.ll
@@ -116,12 +116,12 @@ entry:
ret i64 %rem
}
-declare i64 @llvm.ctlz.i64(i64) nounwind readnone
+declare i64 @llvm.ctlz.i64(i64, i1) nounwind readnone
define i64 @f18(i64 %X) nounwind readnone {
entry:
; CHECK: dclz $2, $4
- %tmp1 = tail call i64 @llvm.ctlz.i64(i64 %X)
+ %tmp1 = tail call i64 @llvm.ctlz.i64(i64 %X, i1 true)
ret i64 %tmp1
}
@@ -129,7 +129,7 @@ define i64 @f19(i64 %X) nounwind readnone {
entry:
; CHECK: dclo $2, $4
%neg = xor i64 %X, -1
- %tmp1 = tail call i64 @llvm.ctlz.i64(i64 %neg)
+ %tmp1 = tail call i64 @llvm.ctlz.i64(i64 %neg, i1 true)
ret i64 %tmp1
}
OpenPOWER on IntegriCloud