Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit 56d368f

Browse files
committed
Merging r259886 and r259888:
------------------------------------------------------------------------ r259886 | nemanjai | 2016-02-05 06:50:29 -0800 (Fri, 05 Feb 2016) | 5 lines Fix for PR 26193 This is a simple fix for a PowerPC intrinsic that was incorrectly defined (the return type was incorrect). ------------------------------------------------------------------------ ------------------------------------------------------------------------ r259888 | nemanjai | 2016-02-05 07:03:17 -0800 (Fri, 05 Feb 2016) | 3 lines Add the missing test case for PR26193 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259891 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 9be4dc8 commit 56d368f

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

include/llvm/IR/IntrinsicsPowerPC.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.".
484484
Intrinsic<[llvm_v16i8_ty], [llvm_v8i16_ty, llvm_v8i16_ty],
485485
[IntrNoMem]>;
486486
def int_ppc_altivec_vpkswss : GCCBuiltin<"__builtin_altivec_vpkswss">,
487-
Intrinsic<[llvm_v16i8_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
487+
Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty],
488488
[IntrNoMem]>;
489489
def int_ppc_altivec_vpkswus : GCCBuiltin<"__builtin_altivec_vpkswus">,
490490
Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty],

lib/Target/PowerPC/PPCInstrAltivec.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ def VPKSHSS : VX1_Int_Ty2<398, "vpkshss", int_ppc_altivec_vpkshss,
736736
def VPKSHUS : VX1_Int_Ty2<270, "vpkshus", int_ppc_altivec_vpkshus,
737737
v16i8, v8i16>;
738738
def VPKSWSS : VX1_Int_Ty2<462, "vpkswss", int_ppc_altivec_vpkswss,
739-
v16i8, v4i32>;
739+
v8i16, v4i32>;
740740
def VPKSWUS : VX1_Int_Ty2<334, "vpkswus", int_ppc_altivec_vpkswus,
741741
v8i16, v4i32>;
742742
def VPKUHUM : VXForm_1<14, (outs vrrc:$vD), (ins vrrc:$vA, vrrc:$vB),

test/CodeGen/PowerPC/pr26193.ll

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
; RUN: llc -mcpu=pwr7 -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s
2+
define <8 x i16> @test(<4 x i32> %a) {
3+
entry:
4+
%0 = tail call <8 x i16> @llvm.ppc.altivec.vpkswss(<4 x i32> %a, <4 x i32> %a)
5+
ret <8 x i16> %0
6+
}
7+
; CHECK: vpkswss 2,
8+
9+
declare <8 x i16> @llvm.ppc.altivec.vpkswss(<4 x i32>, <4 x i32>)

0 commit comments

Comments
 (0)