[llvm] [msan] Add handleIntrinsicByApplyingToShadow; support NEON tbl (PR #114490)

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 31 16:46:51 PDT 2024


================
@@ -3944,6 +3944,30 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
     }
   }
 
+  /// Handle intrinsics by applying the intrinsic to the shadows.
+  /// The origin is approximated using setOriginForNaryOp.
+  ///
+  /// For example, this can be applied to the Arm NEON vector table intrinsics
+  /// (tbl{1,2,3,4}).
+  void handleIntrinsicByApplyingToShadow(IntrinsicInst &I, unsigned int numArgOperands) {
+    IRBuilder<> IRB(&I);
+
+    // Don't use getNumOperands() because it includes the callee
+    assert (numArgOperands == I.arg_size());
----------------
thurstond wrote:

It was there as a correctness check (we know that neon_tbl1 should have 2 arguments, neon_tbx1 should have 3 arguments). I will remove it.

https://github.com/llvm/llvm-project/pull/114490


More information about the llvm-commits mailing list