1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s | FileCheck %s
3 target datalayout = "e-m:e-i64:64-n32:64"
4 target triple = "powerpc64le-unknown-linux-gnu"
6 define i1 @and_cmp_variable_power_of_two(i32 %x, i32 %y) {
7 ; CHECK-LABEL: and_cmp_variable_power_of_two:
9 ; CHECK-NEXT: subfic 4, 4, 32
10 ; CHECK-NEXT: rlwnm 3, 3, 4, 31, 31
13 %and = and i32 %x, %shl
14 %cmp = icmp eq i32 %and, %shl
18 define i1 @and_cmp_variable_power_of_two_64(i64 %x, i64 %y) {
19 ; CHECK-LABEL: and_cmp_variable_power_of_two_64:
21 ; CHECK-NEXT: subfic 4, 4, 64
22 ; CHECK-NEXT: rldcl 3, 3, 4, 63
25 %and = and i64 %x, %shl
26 %cmp = icmp eq i64 %and, %shl
30 define i1 @and_ncmp_variable_power_of_two(i32 %x, i32 %y) {
31 ; CHECK-LABEL: and_ncmp_variable_power_of_two:
33 ; CHECK-NEXT: subfic 4, 4, 32
34 ; CHECK-NEXT: nor 3, 3, 3
35 ; CHECK-NEXT: rlwnm 3, 3, 4, 31, 31
38 %and = and i32 %x, %shl
39 %cmp = icmp ne i32 %and, %shl
43 define i1 @and_ncmp_variable_power_of_two_64(i64 %x, i64 %y) {
44 ; CHECK-LABEL: and_ncmp_variable_power_of_two_64:
46 ; CHECK-NEXT: not 3, 3
47 ; CHECK-NEXT: subfic 4, 4, 64
48 ; CHECK-NEXT: rldcl 3, 3, 4, 63
51 %and = and i64 %x, %shl
52 %cmp = icmp ne i64 %and, %shl