Fixes PR31789 - When loop-vectorize tries to use these intrinsics for a non-default address space pointer we fail with a "Calling a function with a bad signature!" assertion. This patch tries to solve this by adding the 'vector of pointers' argument as an overloaded type which will determine the address space.
Details
Diff Detail
Event Timeline
lib/IR/Function.cpp | ||
---|---|---|
1053 | I suggest to keep the standard (or close to standard) Argument_Info structure and access it though functions. |
I might have missed something, but all the examples in the langref and test-cases include only pointers to addspace(0). Maybe change/add tests and example to include non-zero address-spaces?
I have added new test-cases in test/Transforms/LoopVectorize/X86/gather_scatter.ll to check that the Loop Vectorizer can successfully create scatter/gather instructions for pointers in the non-default address space.
I'll add non-default address space examples to the langref - thanks!
lib/IR/Function.cpp | ||
---|---|---|
724 | This is one more place where I suggest to replace the hardcoded "shift" with a method. |
This is one more place where I suggest to replace the hardcoded "shift" with a method.