[PATCH] D30086: Add generic IR vector reductions
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 8 05:55:39 PDT 2017
aemerson added a comment.
In https://reviews.llvm.org/D30086#748597, @rengolin wrote:
> Right, this is looking much better. Now, what about tests?
>
> We'd probably need a bunch of tests to make sure that the intrinsics are accepted in the syntax that they're documented and rejected otherwise.
>
> I'm not sure how's the best way forward, but probably just having IR in the right/wrong format and passing `-validate` or something expecting it to pass/fail would be a start.
>
> cheers,
> --renato
The type checking is already done as part of the intrinsics handling framework. When people add new intrinsics they don't really add tests to check the IR since you get assertion failures during the FunctionType creation if something goes wrong. It's why you specify the types in the intrinsics signatures. If on the other hand there were other tests like checking that the actual values given to the intrinsics are well formed then verifier tests make sense. Here however the reductions don't care about the actual values.
Since this is laying the foundations, and that future patches will a) enable this for AArch64 (which comes with reduction tests), and b) adds an expansion pass to convert back into shuffle reductions, I don't see the need to test the actual bare intrinsics part here.
Repository:
rL LLVM
https://reviews.llvm.org/D30086
More information about the llvm-commits
mailing list