These need special handling over the simple vector intrinsics as they behave more like a shuffle operation: taking the top half of the vector from one input, and the bottom half separately. Previously, these were being handled as though all bits of all operands were combined.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The test should be in LLVM, under test/Instrumentation/MemorySanitizer
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | ||
---|---|---|
3077 | 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. |
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | ||
---|---|---|
3077 | The codegen is basically identical either way, but if you'd like I can still upload a patch to change these into shufflevector instructions. |
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | ||
---|---|---|
3331 | Whoops! |
LGTM
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | ||
---|---|---|
3077 | llvm:: is unnecessary, and <int> is probably too |
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.