1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
3 ; RUN: llc -mtriple=powerpc64-ibm-aix-xcoff < %s | FileCheck %s
6 define i32 @test1(i32 %a) {
9 ; CHECK-NEXT: rlwinm 3, 3, 0, 0, 30
15 ; mask 0xFFFFFFFFFFFFFFF9
16 define i64 @test2(i64 %a) {
19 ; CHECK-NEXT: rldicl 3, 3, 61, 2
20 ; CHECK-NEXT: rotldi 3, 3, 3
26 ; mask: 0xFFFFFFC00000
27 define i64 @test3(i64 %a) {
30 ; CHECK-NEXT: rldicl 3, 3, 42, 22
31 ; CHECK-NEXT: rldicl 3, 3, 22, 16
33 %and = and i64 %a, 281474972516352
38 define i64 @test4(i64 %a) {
41 ; CHECK-NEXT: rldicl 3, 3, 30, 26
42 ; CHECK-NEXT: rldicl 3, 3, 34, 28
44 %and = and i64 %a, 51539607807
49 define i64 @test5(i64 %a) {
52 ; CHECK-NEXT: rldicl 3, 3, 42, 6
53 ; CHECK-NEXT: rldicl 3, 3, 22, 32
55 %and = and i64 %a, 4290838527
60 define i64 @test6(i64 %a) {
63 ; CHECK-NEXT: lis 4, 16320
64 ; CHECK-NEXT: ori 4, 4, 65504
65 ; CHECK-NEXT: and 3, 3, 4
67 %and = and i64 %a, 1069613024
71 ; mask: 0x3FC000001FFFF
72 define i64 @test7(i64 %a) {
75 ; CHECK-NEXT: rldicl 3, 3, 22, 25
76 ; CHECK-NEXT: rldicl 3, 3, 42, 14
78 %and = and i64 %a, 1121501860462591