[PATCH] D82398: [MSAN] Handle x86 {round,min,max}sd intrinsics

Evgenii Stepanov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 23 16:44:04 PDT 2020


eugenis accepted this revision.
eugenis added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3077
+    Value *LowShadow = IRB.CreateOr(LowA, LowB);
+    Value *Shadow = IRB.CreateInsertElement(Second, LowShadow, IRB.getInt32(0));
+
----------------
eugenis wrote:
> guiand wrote:
> > eugenis wrote:
> > > You probably want to insert in First, not Second.
> > > 
> > > Is the generated code any better if you OR the vectors, and then shuffle to put the top element of First into the top element of the output? That's what LLVM generates if I express this logic in C.
> > > 
> > > 
> > The codegen is basically identical either way, but if you'd like I can still upload a patch to change these into shufflevector instructions.
> This is much better.
> Use makeArrayRef({2, 1}).
llvm:: is unnecessary, and <int> is probably too


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82398/new/

https://reviews.llvm.org/D82398





More information about the cfe-commits mailing list