llvm-project/llvm/lib/Target/RISCV/Utils
Craig Topper 76202f09b5 [RISCV] Improve VMConstraint checking on more unary and nullary instructions.
We weren't consistently marking unary instructions as OneInput
and vid.v is really ZeroInput but we had no way to mark that.

This patch improves this by removing the error prone OneInput constraint.
Instead we just always look for the mask in the last operand.

It appears that the "CheckReg" variable used for the check on the broken
instruction was unitialized or garbage because it was also used for
VS1/VS2 constraints. I've scoped the variable locally to each check now.

I've gone through and set NoConstraint on instructions that don't have
a real VMConstraint and don't have a mask as the last operand.

I've also removed the unused enum values in RISCVBaseInfo.h. We
never use them in C++ and we have separate versions in a td file.

Reviewed By: HsiangKai

Differential Revision: https://reviews.llvm.org/D93784
2020-12-26 18:47:59 -08:00
..
CMakeLists.txt llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
RISCVBaseInfo.cpp [RISCV] Add intrinsics for vsetvli instruction 2020-12-18 12:10:09 -08:00
RISCVBaseInfo.h [RISCV] Improve VMConstraint checking on more unary and nullary instructions. 2020-12-26 18:47:59 -08:00
RISCVMatInt.cpp RISCVMatInt.h - remove unnecessary includes. NFCI. 2020-09-08 18:25:24 +01:00
RISCVMatInt.h RISCVMatInt.h - remove unnecessary includes. NFCI. 2020-09-08 18:25:24 +01:00