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: srw 3, 3, 4
12 %and = and i32 %x, %shl
13 %cmp = icmp eq i32 %and, %shl
17 define i1 @and_cmp_variable_power_of_two_64(i64 %x, i64 %y) {
18 ; CHECK-LABEL: and_cmp_variable_power_of_two_64:
20 ; CHECK-NEXT: srd 3, 3, 4
23 %and = and i64 %x, %shl
24 %cmp = icmp eq i64 %and, %shl
28 define i1 @and_ncmp_variable_power_of_two(i32 %x, i32 %y) {
29 ; CHECK-LABEL: and_ncmp_variable_power_of_two:
31 ; CHECK-NEXT: srw 3, 3, 4
32 ; CHECK-NEXT: xori 3, 3, 1
35 %and = and i32 %x, %shl
36 %cmp = icmp ne i32 %and, %shl
40 define i1 @and_ncmp_variable_power_of_two_64(i64 %x, i64 %y) {
41 ; CHECK-LABEL: and_ncmp_variable_power_of_two_64:
43 ; CHECK-NEXT: srd 3, 3, 4
44 ; CHECK-NEXT: xori 3, 3, 1
47 %and = and i64 %x, %shl
48 %cmp = icmp ne i64 %and, %shl