[llvm-commits] [llvm] r67635 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/shift.ll

Chris Lattner clattner at apple.com
Tue Mar 24 19:09:23 PDT 2009


On Mar 24, 2009, at 2:45 PM, Misha Brukman wrote:

> On Tue, Mar 24, 2009 at 2:15 PM, Chris Lattner <sabre at nondot.org>  
> wrote:
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/test/Transforms/InstCombine/shift.ll (original)
> +++ llvm/trunk/test/Transforms/InstCombine/shift.ll Tue Mar 24  
> 13:15:30 2009
> @@ -206,4 +206,11 @@
>         %D = shl i32 %C, 1              ; <i32> [#uses=1]
>         ret i32 %D
>  }
> +
> +
> +define i1 @test27(i32 %x) nounwind {
> +  %y = lshr i32 %x, 3
> +  %z = trunc i32 %y to i1
> +  ret i1 %z
> +}
>
> This would work great as a unittest.  Just sayin'.

Why would it be better as a unit test?

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090324/34f2faf0/attachment.html>


More information about the llvm-commits mailing list