[llvm] [nvptx] Fix autoupdater's intrinsic matcher (PR #73330)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 24 11:48:12 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Nathan Sidwell (urnathan)
<details>
<summary>Changes</summary>
The nvptx autoupdater's intrinsic matcher has some suspicious-looking strings. These use '_' (underbar) as the separator, rather than '.' (dot) like all the others. The 'fma.rn.ftz_bf16' string particularly so, as it's paired with 'fma.rn.ftz.bf16x2'. These strings were like this from the original commit (250f2bb2c6a9c) in 2023-06-23 by kahmadian@<!-- -->nvidia.com. AFAICT looking at the rest of that diff, there's nothing special about the 5 intrinsics affected, and the TD files do not seem to be making any effort to use '_' rather than '.' on them.
There is no change in test coverage -- these intrinsics do not appear to be tested?
---
Full diff: https://github.com/llvm/llvm-project/pull/73330.diff
1 Files Affected:
- (modified) llvm/lib/IR/AutoUpgrade.cpp (+5-5)
``````````diff
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index 63c4b2c71299900..6d55544c0af0dd5 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -635,12 +635,12 @@ static Intrinsic::ID ShouldUpgradeNVPTXBF16Intrinsic(StringRef Name) {
return StringSwitch<Intrinsic::ID>(Name)
.Case("bf16", Intrinsic::nvvm_fma_rn_bf16)
.Case("bf16x2", Intrinsic::nvvm_fma_rn_bf16x2)
- .Case("ftz_bf16", Intrinsic::nvvm_fma_rn_ftz_bf16)
+ .Case("ftz.bf16", Intrinsic::nvvm_fma_rn_ftz_bf16)
.Case("ftz.bf16x2", Intrinsic::nvvm_fma_rn_ftz_bf16x2)
.Case("ftz.relu.bf16", Intrinsic::nvvm_fma_rn_ftz_relu_bf16)
.Case("ftz.relu.bf16x2", Intrinsic::nvvm_fma_rn_ftz_relu_bf16x2)
- .Case("ftz_sat.bf16", Intrinsic::nvvm_fma_rn_ftz_sat_bf16)
- .Case("ftz_sat.bf16x2", Intrinsic::nvvm_fma_rn_ftz_sat_bf16x2)
+ .Case("ftz.sat.bf16", Intrinsic::nvvm_fma_rn_ftz_sat_bf16)
+ .Case("ftz.sat.bf16x2", Intrinsic::nvvm_fma_rn_ftz_sat_bf16x2)
.Case("relu.bf16", Intrinsic::nvvm_fma_rn_relu_bf16)
.Case("relu.bf16x2", Intrinsic::nvvm_fma_rn_relu_bf16x2)
.Case("sat.bf16", Intrinsic::nvvm_fma_rn_sat_bf16)
@@ -677,8 +677,8 @@ static Intrinsic::ID ShouldUpgradeNVPTXBF16Intrinsic(StringRef Name) {
.Case("bf16x2", Intrinsic::nvvm_fmin_bf16x2)
.Case("ftz.bf16", Intrinsic::nvvm_fmin_ftz_bf16)
.Case("ftz.bf16x2", Intrinsic::nvvm_fmin_ftz_bf16x2)
- .Case("ftz.nan_bf16", Intrinsic::nvvm_fmin_ftz_nan_bf16)
- .Case("ftz.nan_bf16x2", Intrinsic::nvvm_fmin_ftz_nan_bf16x2)
+ .Case("ftz.nan.bf16", Intrinsic::nvvm_fmin_ftz_nan_bf16)
+ .Case("ftz.nan.bf16x2", Intrinsic::nvvm_fmin_ftz_nan_bf16x2)
.Case("ftz.nan.xorsign.abs.bf16",
Intrinsic::nvvm_fmin_ftz_nan_xorsign_abs_bf16)
.Case("ftz.nan.xorsign.abs.bf16x2",
``````````
</details>
https://github.com/llvm/llvm-project/pull/73330
More information about the llvm-commits
mailing list