[llvm] [AMDGPU][MC] Implement fft and rotate modes for ds_swizzle_b32 (PR #108064)
Georg Lehmann via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 10 11:57:34 PDT 2024
================
@@ -8141,6 +8143,56 @@ AMDGPUAsmParser::parseSwizzleBitmaskPerm(int64_t &Imm) {
return true;
}
+bool AMDGPUAsmParser::parseSwizzleFFT(int64_t &Imm) {
+ using namespace llvm::AMDGPU::Swizzle;
+
+ if (!skipToken(AsmToken::Comma, "expected a comma"))
+ return false;
+
+ SMLoc Loc = getLoc();
+
+ int64_t Type;
+
+ if (!parseExpr(Type))
+ return false;
+
+ if (Type != FFT_NO_SWIZZLE && Type != FFT_SWIZZLE_00 &&
+ Type != FFT_SWIZZLE_10) {
+ const std::string ErrMsg = "invalid FFT swizzle type: must be " +
+ std::to_string(FFT_SWIZZLE_00) + ", " +
+ std::to_string(FFT_SWIZZLE_10) + ", or " +
+ std::to_string(FFT_NO_SWIZZLE);
----------------
DadSchoorse wrote:
Are you sure that only these three modes are supported? The pseudo code in the ISA docs would work for any value in [0:31].
https://github.com/llvm/llvm-project/pull/108064
More information about the llvm-commits
mailing list