37 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -O3 < %s | FileCheck %s3 4target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"5target triple = "arm64--linux-gnu"6 7; Function Attrs: nounwind readnone8define i32 @test1(i8 %a) {9; CHECK-LABEL: test1:10; CHECK: // %bb.0: // %entry11; CHECK-NEXT: ubfx w0, w0, #3, #512; CHECK-NEXT: ret13entry:14 %conv = zext i8 %a to i3215 %shr1 = lshr i32 %conv, 316 ret i32 %shr117}18 19; Function Attrs: nounwind readnone20define i32 @test2(i8 %a) {21; CHECK-LABEL: test2:22; CHECK: // %bb.0: // %entry23; CHECK-NEXT: and w8, w0, #0xff24; CHECK-NEXT: ubfx w9, w0, #3, #525; CHECK-NEXT: cmp w8, #4726; CHECK-NEXT: csel w0, w9, w8, hi27; CHECK-NEXT: ret28entry:29 %conv = zext i8 %a to i3230 %cmp = icmp ugt i8 %a, 4731 %shr5 = lshr i32 %conv, 332 %retval.0 = select i1 %cmp, i32 %shr5, i32 %conv33 ret i32 %retval.034}35 36 37