X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FCodeGen%2FARM%2Fsxt_rot.ll;h=41626910c3b151721f7a64f2d55ae52fb7caa330;hb=874371d11b1a72ac57929c43319b795a560efbeb;hp=bfecce8bde227fe478f479222ffcb7b8a5ede3ae;hpb=28beeeac4db2d582d4947db96d62e423e4b68d88;p=oota-llvm.git diff --git a/test/CodeGen/ARM/sxt_rot.ll b/test/CodeGen/ARM/sxt_rot.ll index bfecce8bde2..41626910c3b 100644 --- a/test/CodeGen/ARM/sxt_rot.ll +++ b/test/CodeGen/ARM/sxt_rot.ll @@ -1,22 +1,31 @@ -; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | \ -; RUN: grep sxtb | count 1 -; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | \ -; RUN: grep sxtab | count 1 +; RUN: llc -mtriple=arm-eabi -mattr=+v6 %s -o - | FileCheck %s -define i8 @test1(i32 %A) signext { - %B = lshr i32 %A, 8 - %C = shl i32 %A, 24 - %D = or i32 %B, %C - %E = trunc i32 %D to i8 - ret i8 %E +define i32 @test0(i8 %A) { +; CHECK: test0 +; CHECK: sxtb r0, r0 + %B = sext i8 %A to i32 + ret i32 %B } -define i32 @test2(i32 %A, i32 %X) signext { - %B = lshr i32 %A, 8 - %C = shl i32 %A, 24 - %D = or i32 %B, %C - %E = trunc i32 %D to i8 - %F = sext i8 %E to i32 - %G = add i32 %F, %X - ret i32 %G +define signext i8 @test1(i32 %A) { +; CHECK: test1 +; CHECK: lsr r0, r0, #8 +; CHECK: sxtb r0, r0 + %B = lshr i32 %A, 8 + %C = shl i32 %A, 24 + %D = or i32 %B, %C + %E = trunc i32 %D to i8 + ret i8 %E +} + +define signext i32 @test2(i32 %A, i32 %X) { +; CHECK: test2 +; CHECK: sxtab r0, r1, r0 + %B = lshr i32 %A, 8 + %C = shl i32 %A, 24 + %D = or i32 %B, %C + %E = trunc i32 %D to i8 + %F = sext i8 %E to i32 + %G = add i32 %F, %X + ret i32 %G }