[RISCV] Require tail policy argument to builtins to be an integer constant expression
authorCraig Topper <craig.topper@sifive.com>
Mon, 11 Oct 2021 16:43:51 +0000 (09:43 -0700)
committerCraig Topper <craig.topper@sifive.com>
Mon, 11 Oct 2021 16:55:04 +0000 (09:55 -0700)
The IR intrinsics use ImmArg for the policy operand so this needs to be enforced as a constant in the frontend.

Differential Revision: https://reviews.llvm.org/D110779

clang/utils/TableGen/RISCVVEmitter.cpp

index 1525006..f71df8b 100644 (file)
@@ -1184,7 +1184,7 @@ void RVVEmitter::createRVVIntrinsics(
     }
 
     if (HasPolicy) {
-      ProtoMaskSeq.push_back("z");
+      ProtoMaskSeq.push_back("Kz");
     }
 
     // Create Intrinsics for each type and LMUL.