50 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple powerpc64le-unknown-linux-gnu < %s | FileCheck %s3; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s | FileCheck %s4 5define i1 @and_cmp_variable_power_of_two(i32 %x, i32 %y) {6; CHECK-LABEL: and_cmp_variable_power_of_two:7; CHECK: # %bb.0:8; CHECK-NEXT: srw 3, 3, 49; CHECK-NEXT: blr10 %shl = shl i32 1, %y11 %and = and i32 %x, %shl12 %cmp = icmp eq i32 %and, %shl13 ret i1 %cmp14}15 16define i1 @and_cmp_variable_power_of_two_64(i64 %x, i64 %y) {17; CHECK-LABEL: and_cmp_variable_power_of_two_64:18; CHECK: # %bb.0:19; CHECK-NEXT: srd 3, 3, 420; CHECK-NEXT: blr21 %shl = shl i64 1, %y22 %and = and i64 %x, %shl23 %cmp = icmp eq i64 %and, %shl24 ret i1 %cmp25}26 27define i1 @and_ncmp_variable_power_of_two(i32 %x, i32 %y) {28; CHECK-LABEL: and_ncmp_variable_power_of_two:29; CHECK: # %bb.0:30; CHECK-NEXT: srw 3, 3, 431; CHECK-NEXT: xori 3, 3, 132; CHECK-NEXT: blr33 %shl = shl i32 1, %y34 %and = and i32 %x, %shl35 %cmp = icmp ne i32 %and, %shl36 ret i1 %cmp37}38 39define i1 @and_ncmp_variable_power_of_two_64(i64 %x, i64 %y) {40; CHECK-LABEL: and_ncmp_variable_power_of_two_64:41; CHECK: # %bb.0:42; CHECK-NEXT: srd 3, 3, 443; CHECK-NEXT: xori 3, 3, 144; CHECK-NEXT: blr45 %shl = shl i64 1, %y46 %and = and i64 %x, %shl47 %cmp = icmp ne i64 %and, %shl48 ret i1 %cmp49}50