1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O2 < %s | FileCheck %s
3 target triple = "powerpc64le-linux-gnu"
5 define void @test(ptr %p, i64 %data) {
7 ; CHECK: # %bb.0: # %entry
8 ; CHECK-NEXT: rotldi 5, 4, 16
9 ; CHECK-NEXT: rldicl 6, 4, 8, 56
10 ; CHECK-NEXT: rldimi 6, 5, 8, 48
11 ; CHECK-NEXT: rotldi 5, 4, 24
12 ; CHECK-NEXT: rldimi 6, 5, 16, 40
13 ; CHECK-NEXT: rotldi 5, 4, 32
14 ; CHECK-NEXT: rldimi 6, 5, 24, 32
15 ; CHECK-NEXT: rlwinm 5, 4, 8, 24, 31
16 ; CHECK-NEXT: rlwimi 5, 4, 24, 16, 23
17 ; CHECK-NEXT: stw 6, 0(3)
18 ; CHECK-NEXT: sth 5, 4(3)
21 %0 = tail call i64 @llvm.bswap.i64(i64 %data)
22 %val = trunc i64 %0 to i48
23 store i48 %val, ptr %p, align 1
27 declare i64 @llvm.bswap.i64(i64)