1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc \
3 ; RUN: -mcpu=pwr9 < %s | FileCheck %s --check-prefix=32BIT
5 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64 \
6 ; RUN: -mcpu=pwr9 < %s | FileCheck %s --check-prefix=64BIT
8 define dso_local void @foo(i32 %inta, ptr %long_intb) {
10 ; 32BIT: # %bb.0: # %entry
11 ; 32BIT-NEXT: srawi 5, 3, 31
12 ; 32BIT-NEXT: rotlwi 6, 3, 8
13 ; 32BIT-NEXT: slwi 3, 3, 8
14 ; 32BIT-NEXT: rlwimi 6, 5, 8, 0, 23
15 ; 32BIT-NEXT: stw 3, 4(4)
16 ; 32BIT-NEXT: stw 6, 0(4)
20 ; 64BIT: # %bb.0: # %entry
21 ; 64BIT-NEXT: extswsli 3, 3, 8
22 ; 64BIT-NEXT: std 3, 0(4)
25 %conv = sext i32 %inta to i64
26 %shl = shl nsw i64 %conv, 8
27 store i64 %shl, ptr %long_intb, align 8