summaryrefslogtreecommitdiffstats
path: root/clang/utils/TableGen/NeonEmitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/utils/TableGen/NeonEmitter.cpp')
-rw-r--r--clang/utils/TableGen/NeonEmitter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/utils/TableGen/NeonEmitter.cpp b/clang/utils/TableGen/NeonEmitter.cpp
index ac9e22491e6..e4c6cb3b1d7 100644
--- a/clang/utils/TableGen/NeonEmitter.cpp
+++ b/clang/utils/TableGen/NeonEmitter.cpp
@@ -3007,6 +3007,14 @@ NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS,
rangestr = "l = 1; ";
rangestr += "u = RFT(TV" + shiftstr + ")";
+ } else if (ck == ClassB) {
+ // ClassB intrinsics have a type (and hence lane number) that is only
+ // known at runtime.
+ assert(immPos > 0 && "unexpected immediate operand");
+ if (R->getValueAsBit("isLaneQ"))
+ rangestr = "u = RFT(TV, false, true)";
+ else
+ rangestr = "u = RFT(TV, false, false)";
} else {
// The immediate generally refers to a lane in the preceding argument.
assert(immPos > 0 && "unexpected immediate operand");
OpenPOWER on IntegriCloud