Commit Graph

2 Commits

Author SHA1 Message Date
Sanjay Patel 215bb15791 [IR] restrict vector reduction intrinsic types
The arguments in all cases should be vectors of exactly one of integer or FP.

All of the tests currently pass the verifier because we check for any vector
type regardless of the type of reduction.
This obviously can't work if we mix up integer and FP, and based on current
LangRef text it was not intended to work for pointers either.

The pointer case from https://llvm.org/PR49215 is what led me here. That
example was avoided with 5b250a27ec.

Differential Revision: https://reviews.llvm.org/D96904
2021-02-21 12:37:00 -05:00
Sanjay Patel a1e5388a7c [Verifier] add tests for vector reductions; NFC
Checking existing functionality before D96904.
2021-02-18 10:35:38 -05:00