Home | History | Annotate | Download | only in PowerPC
      1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
      2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
      3 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
      4 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
      5 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
      6 ; RUN:   -ppc-gpr-icmps=all -ppc-asm-full-reg-names -mcpu=pwr8 < %s | FileCheck %s \
      7 ; RUN:  --implicit-check-not cmpw --implicit-check-not cmpd --implicit-check-not cmpl
      8 
      9 define signext i32 @test(i8 zeroext %a, i8 zeroext %b) {
     10 ; CHECK-LABEL: test:
     11 ; CHECK:       # %bb.0: # %entry
     12 ; CHECK-NEXT:    rlwinm r3, r3, 0, 31, 31
     13 ; CHECK-NEXT:    rlwinm r4, r4, 0, 31, 31
     14 ; CHECK-NEXT:    clrldi r3, r3, 32
     15 ; CHECK-NEXT:    clrldi r4, r4, 32
     16 ; CHECK-NEXT:    sub r3, r4, r3
     17 ; CHECK-NEXT:    rldicl r3, r3, 1, 63
     18 ; CHECK-NEXT:    xori r3, r3, 1
     19 ; CHECK-NEXT:    blr
     20 entry:
     21   %0 = and i8 %a, 1
     22   %1 = and i8 %b, 1
     23   %cmp = icmp ule i8 %0, %1
     24   %conv3 = zext i1 %cmp to i32
     25   ret i32 %conv3
     26 }
     27