[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 152500610a293ac46b7cfd1eed147575dae1929f..f71df8b3063a3863209465f5f4831c691dd8c831 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.