From: Ben Shi Date: Fri, 31 Mar 2023 09:59:31 +0000 (+0800) Subject: [RISCV][NFC] Simplify PatFrag mul_const_oneuse X-Git-Tag: upstream/17.0.6~12990 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce616aa014e1bf2710ae3afb2e4cd814cdadb402;p=platform%2Fupstream%2Fllvm.git [RISCV][NFC] Simplify PatFrag mul_const_oneuse Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D147309 --- diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.td b/llvm/lib/Target/RISCV/RISCVInstrInfo.td index 888c9b3..a13f672 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfo.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.td @@ -1247,8 +1247,7 @@ def mul_oneuse : binop_oneuse; def mul_const_oneuse : PatFrag<(ops node:$A, node:$B), (mul node:$A, node:$B), [{ if (auto *N1C = dyn_cast(N->getOperand(1))) - if (N1C->hasOneUse()) - return true; + return N1C->hasOneUse(); return false; }]>;