1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-unknown | FileCheck %s 3 4define i1 @and_cmp1(i32 %x, i32 %y) { 5; CHECK-LABEL: and_cmp1: 6; CHECK: # %bb.0: 7; CHECK-NEXT: andc 3, 4, 3 8; CHECK-NEXT: cntlzw 3, 3 9; CHECK-NEXT: rlwinm 3, 3, 27, 31, 31 10; CHECK-NEXT: blr 11 %and = and i32 %x, %y 12 %cmp = icmp eq i32 %and, %y 13 ret i1 %cmp 14} 15 16define i1 @and_cmp_const(i32 %x) { 17; CHECK-LABEL: and_cmp_const: 18; CHECK: # %bb.0: 19; CHECK-NEXT: li 4, 43 20; CHECK-NEXT: andc 3, 4, 3 21; CHECK-NEXT: cntlzw 3, 3 22; CHECK-NEXT: rlwinm 3, 3, 27, 31, 31 23; CHECK-NEXT: blr 24 %and = and i32 %x, 43 25 %cmp = icmp eq i32 %and, 43 26 ret i1 %cmp 27} 28 29define i1 @foo(i32 %i) { 30; CHECK-LABEL: foo: 31; CHECK: # %bb.0: 32; CHECK-NEXT: lis 4, 4660 33; CHECK-NEXT: ori 4, 4, 22136 34; CHECK-NEXT: andc 3, 4, 3 35; CHECK-NEXT: cntlzw 3, 3 36; CHECK-NEXT: rlwinm 3, 3, 27, 31, 31 37; CHECK-NEXT: blr 38 %and = and i32 %i, 305419896 39 %cmp = icmp eq i32 %and, 305419896 40 ret i1 %cmp 41} 42 43define <4 x i32> @hidden_not_v4i32(<4 x i32> %x) { 44; CHECK-LABEL: hidden_not_v4i32: 45; CHECK: # %bb.0: 46; CHECK-NEXT: vspltisw 3, 6 47; CHECK-NEXT: xxlandc 34, 35, 34 48; CHECK-NEXT: blr 49 %xor = xor <4 x i32> %x, <i32 15, i32 15, i32 15, i32 15> 50 %and = and <4 x i32> %xor, <i32 6, i32 6, i32 6, i32 6> 51 ret <4 x i32> %and 52} 53 54