448 lines
12 KiB
LLVM
448 lines
12 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
|
|
|
|
target datalayout = "E-m:a-i64:64-n32:64-S128-v256:256:256-v512:512:512"
|
|
target triple = "powerpc64-ibm-aix7.2.0.0"
|
|
|
|
%struct.USST = type { i16, i16 }
|
|
%struct.SST = type { i16, i16 }
|
|
%struct.CST = type { i8, i8 }
|
|
%struct.SCST = type { i8, i8 }
|
|
%struct.ST = type { i32, i32 }
|
|
%struct.UST = type { i32, i32 }
|
|
%struct.LST = type { i64, i64 }
|
|
%struct.ULST = type { i64, i64 }
|
|
|
|
; Function Attrs: nounwind
|
|
define zeroext i32 @ustc1(%struct.USST* noundef byval(%struct.USST) align 8 %s) {
|
|
; CHECK-LABEL: ustc1:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: lbz 3, 48(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.USST, %struct.USST* %s, i32 0, i32 0
|
|
%0 = load i16, i16* %a, align 8
|
|
%conv = zext i16 %0 to i32
|
|
%shr = ashr i32 %conv, 8
|
|
ret i32 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define zeroext i32 @ustc2(%struct.USST* noundef byval(%struct.USST) align 8 %s) {
|
|
; CHECK-LABEL: ustc2:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: lhz 3, 48(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.USST, %struct.USST* %s, i32 0, i32 0
|
|
%0 = load i16, i16* %a, align 8
|
|
%conv = zext i16 %0 to i32
|
|
ret i32 %conv
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define signext i32 @stc1(%struct.SST* noundef byval(%struct.SST) align 8 %s) {
|
|
; CHECK-LABEL: stc1:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: lbz 3, 48(1)
|
|
; CHECK-NEXT: extsb 3, 3
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.SST, %struct.SST* %s, i32 0, i32 0
|
|
%0 = load i16, i16* %a, align 8
|
|
%conv = sext i16 %0 to i32
|
|
%shr = ashr i32 %conv, 8
|
|
ret i32 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define signext i32 @stc2(%struct.SST* noundef byval(%struct.SST) align 8 %s) {
|
|
; CHECK-LABEL: stc2:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: lha 3, 48(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.SST, %struct.SST* %s, i32 0, i32 0
|
|
%0 = load i16, i16* %a, align 8
|
|
%conv = sext i16 %0 to i32
|
|
ret i32 %conv
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define signext i32 @ctc(%struct.CST* noundef byval(%struct.CST) align 8 %s) {
|
|
; CHECK-LABEL: ctc:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: lbz 3, 48(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.CST, %struct.CST* %s, i32 0, i32 0
|
|
%0 = load i8, i8* %a, align 8
|
|
%conv = zext i8 %0 to i32
|
|
ret i32 %conv
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define signext i32 @sctc(%struct.SCST* noundef byval(%struct.SCST) align 8 %s) {
|
|
; CHECK-LABEL: sctc:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: lbz 3, 48(1)
|
|
; CHECK-NEXT: extsb 3, 3
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.SCST, %struct.SCST* %s, i32 0, i32 0
|
|
%0 = load i8, i8* %a, align 8
|
|
%conv = sext i8 %0 to i32
|
|
ret i32 %conv
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define signext i32 @tc44(%struct.ST* noundef byval(%struct.ST) align 8 %s) {
|
|
; CHECK-LABEL: tc44:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: lwa 3, 48(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.ST, %struct.ST* %s, i32 0, i32 0
|
|
%0 = load i32, i32* %a, align 8
|
|
ret i32 %0
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define signext i32 @tc41(%struct.ST* noundef byval(%struct.ST) align 8 %s) {
|
|
; CHECK-LABEL: tc41:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: lbz 3, 48(1)
|
|
; CHECK-NEXT: extsb 3, 3
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.ST, %struct.ST* %s, i32 0, i32 0
|
|
%0 = load i32, i32* %a, align 8
|
|
%shr = ashr i32 %0, 24
|
|
ret i32 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define signext i32 @tc42(%struct.ST* noundef byval(%struct.ST) align 8 %s) {
|
|
; CHECK-LABEL: tc42:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: lha 3, 48(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.ST, %struct.ST* %s, i32 0, i32 0
|
|
%0 = load i32, i32* %a, align 8
|
|
%shr = ashr i32 %0, 16
|
|
ret i32 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define signext i32 @tc43(%struct.ST* noundef byval(%struct.ST) align 8 %s) {
|
|
; CHECK-LABEL: tc43:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: lwz 3, 48(1)
|
|
; CHECK-NEXT: srawi 3, 3, 8
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.ST, %struct.ST* %s, i32 0, i32 0
|
|
%0 = load i32, i32* %a, align 8
|
|
%shr = ashr i32 %0, 8
|
|
ret i32 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define zeroext i32 @utc44(%struct.UST* noundef byval(%struct.UST) align 8 %s) #0 {
|
|
; CHECK-LABEL: utc44:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: lwz 3, 48(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.UST, %struct.UST* %s, i32 0, i32 0
|
|
%0 = load i32, i32* %a, align 8
|
|
ret i32 %0
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define zeroext i32 @utc41(%struct.UST* noundef byval(%struct.UST) align 8 %s) {
|
|
; CHECK-LABEL: utc41:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: lbz 3, 48(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.UST, %struct.UST* %s, i32 0, i32 0
|
|
%0 = load i32, i32* %a, align 8
|
|
%shr = lshr i32 %0, 24
|
|
ret i32 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define zeroext i32 @utc42(%struct.UST* noundef byval(%struct.UST) align 8 %s) {
|
|
; CHECK-LABEL: utc42:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: lhz 3, 48(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.UST, %struct.UST* %s, i32 0, i32 0
|
|
%0 = load i32, i32* %a, align 8
|
|
%shr = lshr i32 %0, 16
|
|
ret i32 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define zeroext i32 @utc43(%struct.UST* noundef byval(%struct.UST) align 8 %s) {
|
|
; CHECK-LABEL: utc43:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: lwz 3, 48(1)
|
|
; CHECK-NEXT: rlwinm 3, 3, 24, 8, 31
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.UST, %struct.UST* %s, i32 0, i32 0
|
|
%0 = load i32, i32* %a, align 8
|
|
%shr = lshr i32 %0, 8
|
|
ret i32 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define i64 @ltc88(%struct.LST* noundef byval(%struct.LST) align 8 %s) {
|
|
; CHECK-LABEL: ltc88:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mr 5, 3
|
|
; CHECK-NEXT: sradi 3, 3, 8
|
|
; CHECK-NEXT: std 5, 48(1)
|
|
; CHECK-NEXT: std 4, 56(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.LST, %struct.LST* %s, i32 0, i32 0
|
|
%0 = load i64, i64* %a, align 8
|
|
%shr = ashr i64 %0, 8
|
|
ret i64 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define i64 @ltc86(%struct.LST* noundef byval(%struct.LST) align 8 %s) {
|
|
; CHECK-LABEL: ltc86:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mr 5, 3
|
|
; CHECK-NEXT: sradi 3, 3, 16
|
|
; CHECK-NEXT: std 5, 48(1)
|
|
; CHECK-NEXT: std 4, 56(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.LST, %struct.LST* %s, i32 0, i32 0
|
|
%0 = load i64, i64* %a, align 8
|
|
%shr = ashr i64 %0, 16
|
|
ret i64 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define i64 @ltc85(%struct.LST* noundef byval(%struct.LST) align 8 %s) {
|
|
; CHECK-LABEL: ltc85:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mr 5, 3
|
|
; CHECK-NEXT: sradi 3, 3, 24
|
|
; CHECK-NEXT: std 5, 48(1)
|
|
; CHECK-NEXT: std 4, 56(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.LST, %struct.LST* %s, i32 0, i32 0
|
|
%0 = load i64, i64* %a, align 8
|
|
%shr = ashr i64 %0, 24
|
|
ret i64 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define i64 @ltc84(%struct.LST* noundef byval(%struct.LST) align 8 %s) {
|
|
; CHECK-LABEL: ltc84:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: std 4, 56(1)
|
|
; CHECK-NEXT: lwa 3, 48(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.LST, %struct.LST* %s, i32 0, i32 0
|
|
%0 = load i64, i64* %a, align 8
|
|
%shr = ashr i64 %0, 32
|
|
ret i64 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define i64 @ltc83(%struct.LST* noundef byval(%struct.LST) align 8 %s) {
|
|
; CHECK-LABEL: ltc83:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mr 5, 3
|
|
; CHECK-NEXT: sradi 3, 3, 40
|
|
; CHECK-NEXT: std 5, 48(1)
|
|
; CHECK-NEXT: std 4, 56(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.LST, %struct.LST* %s, i32 0, i32 0
|
|
%0 = load i64, i64* %a, align 8
|
|
%shr = ashr i64 %0, 40
|
|
ret i64 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define i64 @ltc82(%struct.LST* noundef byval(%struct.LST) align 8 %s) {
|
|
; CHECK-LABEL: ltc82:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: std 4, 56(1)
|
|
; CHECK-NEXT: lha 3, 48(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.LST, %struct.LST* %s, i32 0, i32 0
|
|
%0 = load i64, i64* %a, align 8
|
|
%shr = ashr i64 %0, 48
|
|
ret i64 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define i64 @ltc81(%struct.LST* noundef byval(%struct.LST) align 8 %s) {
|
|
; CHECK-LABEL: ltc81:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: std 4, 56(1)
|
|
; CHECK-NEXT: lbz 3, 48(1)
|
|
; CHECK-NEXT: extsb 3, 3
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.LST, %struct.LST* %s, i32 0, i32 0
|
|
%0 = load i64, i64* %a, align 8
|
|
%shr = ashr i64 %0, 56
|
|
ret i64 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define i64 @ultc88(%struct.ULST* noundef byval(%struct.ULST) align 8 %s) {
|
|
; CHECK-LABEL: ultc88:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: std 4, 56(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.ULST, %struct.ULST* %s, i32 0, i32 0
|
|
%0 = load i64, i64* %a, align 8
|
|
ret i64 %0
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define i64 @ultc87(%struct.ULST* noundef byval(%struct.ULST) align 8 %s) {
|
|
; CHECK-LABEL: ultc87:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mr 5, 3
|
|
; CHECK-NEXT: rldicl 3, 3, 56, 8
|
|
; CHECK-NEXT: std 5, 48(1)
|
|
; CHECK-NEXT: std 4, 56(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.ULST, %struct.ULST* %s, i32 0, i32 0
|
|
%0 = load i64, i64* %a, align 8
|
|
%shr = lshr i64 %0, 8
|
|
ret i64 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define i64 @ultc86(%struct.ULST* noundef byval(%struct.ULST) align 8 %s) {
|
|
; CHECK-LABEL: ultc86:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mr 5, 3
|
|
; CHECK-NEXT: rldicl 3, 3, 48, 16
|
|
; CHECK-NEXT: std 5, 48(1)
|
|
; CHECK-NEXT: std 4, 56(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.ULST, %struct.ULST* %s, i32 0, i32 0
|
|
%0 = load i64, i64* %a, align 8
|
|
%shr = lshr i64 %0, 16
|
|
ret i64 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define i64 @ultc85(%struct.ULST* noundef byval(%struct.ULST) align 8 %s) {
|
|
; CHECK-LABEL: ultc85:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mr 5, 3
|
|
; CHECK-NEXT: rldicl 3, 3, 40, 24
|
|
; CHECK-NEXT: std 5, 48(1)
|
|
; CHECK-NEXT: std 4, 56(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.ULST, %struct.ULST* %s, i32 0, i32 0
|
|
%0 = load i64, i64* %a, align 8
|
|
%shr = lshr i64 %0, 24
|
|
ret i64 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define i64 @ultc84(%struct.ULST* noundef byval(%struct.ULST) align 8 %s) {
|
|
; CHECK-LABEL: ultc84:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: std 4, 56(1)
|
|
; CHECK-NEXT: lwz 3, 48(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.ULST, %struct.ULST* %s, i32 0, i32 0
|
|
%0 = load i64, i64* %a, align 8
|
|
%shr = lshr i64 %0, 32
|
|
ret i64 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define i64 @ultc83(%struct.ULST* noundef byval(%struct.ULST) align 8 %s) {
|
|
; CHECK-LABEL: ultc83:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mr 5, 3
|
|
; CHECK-NEXT: rldicl 3, 3, 24, 40
|
|
; CHECK-NEXT: std 5, 48(1)
|
|
; CHECK-NEXT: std 4, 56(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.ULST, %struct.ULST* %s, i32 0, i32 0
|
|
%0 = load i64, i64* %a, align 8
|
|
%shr = lshr i64 %0, 40
|
|
ret i64 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define i64 @ultc82(%struct.ULST* noundef byval(%struct.ULST) align 8 %s) {
|
|
; CHECK-LABEL: ultc82:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: std 4, 56(1)
|
|
; CHECK-NEXT: lhz 3, 48(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.ULST, %struct.ULST* %s, i32 0, i32 0
|
|
%0 = load i64, i64* %a, align 8
|
|
%shr = lshr i64 %0, 48
|
|
ret i64 %shr
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
define i64 @ultc81(%struct.ULST* noundef byval(%struct.ULST) align 8 %s) {
|
|
; CHECK-LABEL: ultc81:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: std 3, 48(1)
|
|
; CHECK-NEXT: std 4, 56(1)
|
|
; CHECK-NEXT: lbz 3, 48(1)
|
|
; CHECK-NEXT: blr
|
|
entry:
|
|
%a = getelementptr inbounds %struct.ULST, %struct.ULST* %s, i32 0, i32 0
|
|
%0 = load i64, i64* %a, align 8
|
|
%shr = lshr i64 %0, 56
|
|
ret i64 %shr
|
|
}
|