[llvm] [AMDGPU] Replace `isInlinableLiteral16` with specific version (PR #81345)
Stanislav Mekhanoshin via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 26 11:50:25 PST 2024
================
@@ -2652,13 +2652,28 @@ bool isInlinableLiteral32(int32_t Literal, bool HasInv2Pi) {
(Val == 0x3e22f983 && HasInv2Pi);
}
-bool isInlinableLiteral16(int16_t Literal, bool HasInv2Pi) {
+bool isInlinableLiteralI16(int16_t Literal, bool HasInv2Pi) {
+ if (!HasInv2Pi)
+ return false;
+ if (isInlinableIntLiteral(Literal))
+ return true;
+ return (Literal == static_cast<int16_t>(llvm::bit_cast<uint32_t>(0.0f))) ||
----------------
rampitec wrote:
I think so too. This large `if` does not have a much use.
https://github.com/llvm/llvm-project/pull/81345
More information about the llvm-commits
mailing list