brintos

brintos / llvm-project-archived public Read only

0
0
Text · 805 B · 7e94be4 Raw
24 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2; The result of max(half-word, half-word) is also half-word.3; Check that we are not producing a sign extend after the max.4; CHECK-NOT: sxth5 6define i64 @test_cast(i64 %arg0, i16 zeroext %arg1, i16 zeroext %arg2) nounwind readnone {7entry:8  %conv.i = zext i16 %arg1 to i329  %conv1.i = zext i16 %arg2 to i3210  %sub.i = sub nsw i32 %conv.i, %conv1.i11  %sext.i = shl i32 %sub.i, 1612  %cmp.i = icmp slt i32 %sext.i, 6553613  %0 = ashr exact i32 %sext.i, 1614  %conv7.i = select i1 %cmp.i, i32 1, i32 %015  %cmp8.i = icmp sgt i32 %conv7.i, 416  %conv7.op.i = add i32 %conv7.i, 6553517  %shl = shl i64 %arg0, 218  %.mask = and i32 %conv7.op.i, 6553519  %1 = zext i32 %.mask to i6420  %conv = select i1 %cmp8.i, i64 3, i64 %121  %or = or i64 %conv, %shl22  ret i64 %or23}24