xcore backend: bug when calling countLeadingZeros()

Richard Osborne richard at xmos.com
Tue Jul 2 07:57:26 PDT 2013


On 02/07/13 13:51, Robert Lytton wrote:
>
> --- /dev/null
> +++ llvm/test/CodeGen/XCore/zext.ll
> @@ -0,0 +1,17 @@
> +; RUN: llc -march=xcore < %s | FileCheck %s
> +;; countLeadingZeros() must be past 32bit types
> +
> +define i32 @f(i1 %a) {
> +entry:
> +; CHECK: zext r0, 1
> +; CHECK: retsp 0
> +  %b= zext i1 %a to i32
> +  ret i32 %b
> +}
Typically FileCheck tests check for the function label (e.g. CHECK: f:) 
so subsequent checks don't inadvertently match instruction sequences in 
other functions.
> +
> +define i32 @g() {
> +entry:
> +; CHECK: mkmsk r0, 1
> +; CHECK: retsp 0
> +  ret i32 1;
> +}
>
This should go in test/CodeGen/XCore/constants.ll (since it relates to 
forming constants).

Otherwise it looks good to me. I've applied the patch with these changes 
in r185430

-- 
Richard Osborne | XMOS
http://www.xmos.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130702/73d2f28a/attachment.html>


More information about the llvm-commits mailing list