1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple powerpc-unknown-linux-gnu -mcpu=pwr7 < %s | FileCheck %s
3 ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr7 -vec-extabi < %s | FileCheck %s
5 ; Function Attrs: nounwind readnone
6 define zeroext i16 @test16(i16 zeroext %x, i16 zeroext %y) #0 {
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: cmpb 3, 4, 3
10 ; CHECK-NEXT: clrlwi 3, 3, 16
15 %cmp = icmp eq i16 %1, 0
16 %cmp20 = icmp ult i16 %0, 256
17 %conv25 = select i1 %cmp, i32 255, i32 0
18 %conv27 = select i1 %cmp20, i32 65280, i32 0
19 %or = or i32 %conv25, %conv27
20 %conv29 = trunc i32 %or to i16
24 define i32 @test32(i32 %x, i32 %y) #0 {
25 ; CHECK-LABEL: test32:
26 ; CHECK: # %bb.0: # %entry
27 ; CHECK-NEXT: cmpb 3, 4, 3
32 %cmp = icmp eq i32 %1, 0
33 %2 = and i32 %0, 65280
34 %cmp28 = icmp eq i32 %2, 0
35 %3 = and i32 %0, 16711680
36 %cmp34 = icmp eq i32 %3, 0
37 %cmp40 = icmp ult i32 %0, 16777216
38 %conv44 = select i1 %cmp, i32 255, i32 0
39 %conv45 = select i1 %cmp28, i32 65280, i32 0
40 %conv47 = select i1 %cmp34, i32 16711680, i32 0
41 %conv50 = select i1 %cmp40, i32 -16777216, i32 0
42 %or = or i32 %conv45, %conv50
43 %or49 = or i32 %or, %conv44
44 %or52 = or i32 %or49, %conv47
48 attributes #0 = { nounwind readnone }