llvm.org GIT mirror llvm / 24e78e0
SLPVectorizer: compare entire intrinsic for SLP compatibility. Some Intrinsics are overloaded to the extent that return type equality (all that's been checked up to now) does not guarantee that the arguments are the same. In these cases SLP vectorizer should not recurse into the operands, which can be achieved by comparing them as "Function *" rather than simply the ID. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205424 91177308-0d34-0410-b5e6-96231b3b80d8 Tim Northover 5 years ago
3 changed file(s) with 23 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
954954 return;
955955 }
956956
957 Intrinsic::ID ID = II->getIntrinsicID();
957 Function *Int = II->getCalledFunction();
958958
959959 for (unsigned i = 1, e = VL.size(); i != e; ++i) {
960960 IntrinsicInst *II2 = dyn_cast(VL[i]);
961 if (!II2 || II2->getIntrinsicID() != ID) {
961 if (!II2 || II2->getCalledFunction() != Int) {
962962 newTreeEntry(VL, false);
963963 DEBUG(dbgs() << "SLP: mismatched calls:" << *II << "!=" << *VL[i]
964964 << "\n");
0 targets = set(config.root.targets_to_build.split())
1 if not 'ARM64' in targets:
2 config.unsupported = True
0 ; RUN: opt -S -slp-vectorizer %s | FileCheck %s
1 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
2 target triple = "arm64-apple-ios5.0.0"
3
4 define i64 @mismatched_intrinsics(<4 x i32> %in1, <2 x i32> %in2) nounwind {
5 ; CHECK-LABEL: @mismatched_intrinsics
6 ; CHECK: call i64 @llvm.arm64.neon.saddlv.i64.v4i32
7 ; CHECK: call i64 @llvm.arm64.neon.saddlv.i64.v2i32
8
9 %vaddlvq_s32.i = tail call i64 @llvm.arm64.neon.saddlv.i64.v4i32(<4 x i32> %in1) #2
10 %vaddlv_s32.i = tail call i64 @llvm.arm64.neon.saddlv.i64.v2i32(<2 x i32> %in2) #2
11 %tst = icmp sgt i64 %vaddlvq_s32.i, %vaddlv_s32.i
12 %equal = sext i1 %tst to i64
13 ret i64 %equal
14 }
15
16 declare i64 @llvm.arm64.neon.saddlv.i64.v4i32(<4 x i32> %in1)
17 declare i64 @llvm.arm64.neon.saddlv.i64.v2i32(<2 x i32> %in1)