[llvm] [AMDGPU] Use std::optional in InstCombine of amdgcn_fmed3. NFC. (PR #108223)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 11 06:50:41 PDT 2024
================
@@ -353,23 +353,20 @@ bool GCNTTIImpl::canSimplifyLegacyMulToMul(const Instruction &I,
}
/// Match an fpext from half to float, or a constant we can convert.
-static bool matchFPExtFromF16(Value *Arg, Value *&FPExtSrc) {
- if (match(Arg, m_OneUse(m_FPExt(m_Value(FPExtSrc)))))
- return FPExtSrc->getType()->isHalfTy();
-
+static std::optional<Value *> matchFPExtFromF16(Value *Arg) {
+ Value *Src;
----------------
jayfoad wrote:
Done
https://github.com/llvm/llvm-project/pull/108223
More information about the llvm-commits
mailing list