================
@@ -3412,7 +3412,8 @@ static bool interp__builtin_x86_byteshift(
 static bool interp__builtin_ia32_shuffle_generic(
     InterpState &S, CodePtr OpPC, const CallExpr *Call,
     llvm::function_ref<std::pair<unsigned, unsigned>(unsigned, unsigned)>
-        GetSourceIndex) {
+        GetSourceIndex,
+    llvm::function_ref<bool(unsigned, unsigned)> ShouldZero = nullptr) {
----------------
RKSimon wrote:

We could just adjust the GetSourceIndex signature to either be 
`std::tuple<unsigned, unsigned, bool>` or `std::pair<unsigned, int>` and treat 
negative cases as zero.

There will be other shuffles (PSHUFB in particular) that will want zero 
handling as well.

CC @chaitanyav 

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

Reply via email to