================
@@ -3531,6 +3531,65 @@ static bool 
interp__builtin_ia32_shufbitqmb_mask(InterpState &S, CodePtr OpPC,
   return true;
 }
 
+static bool interp__builtin_ia32_multishiftqb(InterpState &S, CodePtr OpPC,
+                                              const CallExpr *Call) {
+  assert(Call->getNumArgs() == 2);
+
+  QualType ATy = Call->getArg(0)->getType();
+  QualType BTy = Call->getArg(1)->getType();
+  if (!ATy->isVectorType() || !BTy->isVectorType()) {
+    return false;
+  }
+
+  const Pointer &BPtr = S.Stk.pop<Pointer>();
+  const Pointer &APtr = S.Stk.pop<Pointer>();
+  const auto *AVecT = ATy->castAs<VectorType>();
+  const auto *BVecT = BTy->castAs<VectorType>();
+  assert(AVecT->getNumElements() == BVecT->getNumElements());
----------------
chaitanyav wrote:

understood, i will update the assertion.

```bash
📦 Installing…
ninja: Entering directory `/home/naga/llvm-project/build'
[1205/4534] Building CXX object 
tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/ByteCode/InterpBuiltin.cpp.o
/home/naga/llvm-project/clang/lib/AST/ByteCode/InterpBuiltin.cpp:3547:15: 
warning: unused variable 'BVecT' [-Wunused-variable]
 3547 |   const auto *BVecT = BTy->castAs<VectorType>();
      |               ^~~~~
```

https://github.com/llvm/llvm-project/pull/168995
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to