1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s | FileCheck %s 3target datalayout = "e-m:e-i64:64-n32:64" 4target triple = "powerpc64le-unknown-linux-gnu" 5 6define i1 @and_cmp_variable_power_of_two(i32 %x, i32 %y) { 7; CHECK-LABEL: and_cmp_variable_power_of_two: 8; CHECK: # %bb.0: 9; CHECK-NEXT: srw 3, 3, 4 10; CHECK-NEXT: blr 11 %shl = shl i32 1, %y 12 %and = and i32 %x, %shl 13 %cmp = icmp eq i32 %and, %shl 14 ret i1 %cmp 15} 16 17define i1 @and_cmp_variable_power_of_two_64(i64 %x, i64 %y) { 18; CHECK-LABEL: and_cmp_variable_power_of_two_64: 19; CHECK: # %bb.0: 20; CHECK-NEXT: srd 3, 3, 4 21; CHECK-NEXT: blr 22 %shl = shl i64 1, %y 23 %and = and i64 %x, %shl 24 %cmp = icmp eq i64 %and, %shl 25 ret i1 %cmp 26} 27 28define i1 @and_ncmp_variable_power_of_two(i32 %x, i32 %y) { 29; CHECK-LABEL: and_ncmp_variable_power_of_two: 30; CHECK: # %bb.0: 31; CHECK-NEXT: srw 3, 3, 4 32; CHECK-NEXT: xori 3, 3, 1 33; CHECK-NEXT: blr 34 %shl = shl i32 1, %y 35 %and = and i32 %x, %shl 36 %cmp = icmp ne i32 %and, %shl 37 ret i1 %cmp 38} 39 40define i1 @and_ncmp_variable_power_of_two_64(i64 %x, i64 %y) { 41; CHECK-LABEL: and_ncmp_variable_power_of_two_64: 42; CHECK: # %bb.0: 43; CHECK-NEXT: srd 3, 3, 4 44; CHECK-NEXT: xori 3, 3, 1 45; CHECK-NEXT: blr 46 %shl = shl i64 1, %y 47 %and = and i64 %x, %shl 48 %cmp = icmp ne i64 %and, %shl 49 ret i1 %cmp 50} 51