diff options
author | Yingwei Zheng <dtcxzyw2333@gmail.com> | 2024-02-14 16:40:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-14 16:40:36 +0800 |
commit | 470c5b8011b94ecb0ee8dbdb34ab8d680f652f70 (patch) | |
tree | 7a9de4021946927617b4f19d2cfd1cf9c8bf1269 /llvm/lib/IR/IntrinsicInst.cpp | |
parent | 243f14d23643e28e98d8c8d2993bd17947c101b2 (diff) | |
download | llvm-470c5b8011b94ecb0ee8dbdb34ab8d680f652f70.zip llvm-470c5b8011b94ecb0ee8dbdb34ab8d680f652f70.tar.gz llvm-470c5b8011b94ecb0ee8dbdb34ab8d680f652f70.tar.bz2 |
[InstSimplify][InstCombine] Remove unnecessary `m_c_*` matchers. (#81712)
This patch removes unnecessary `m_c_*` matchers since we always
canonicalize `commutive_op Cst, X` into `commutive_op X, Cst`.
Compile-time impact:
https://llvm-compile-time-tracker.com/compare.php?from=bfc0b7c6891896ee8e9818f22800472510093864&to=d27b058bb9acaa43d3cadbf3cd889e8f79e5c634&stat=instructions:u
Diffstat (limited to 'llvm/lib/IR/IntrinsicInst.cpp')
-rw-r--r-- | llvm/lib/IR/IntrinsicInst.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/IntrinsicInst.cpp b/llvm/lib/IR/IntrinsicInst.cpp index 7a3b708..5050091 100644 --- a/llvm/lib/IR/IntrinsicInst.cpp +++ b/llvm/lib/IR/IntrinsicInst.cpp @@ -623,7 +623,7 @@ bool VPIntrinsic::canIgnoreVectorLengthParam() const { if (EC.isScalable()) { // Compare vscale patterns uint64_t VScaleFactor; - if (match(VLParam, m_c_Mul(m_ConstantInt(VScaleFactor), m_VScale()))) + if (match(VLParam, m_Mul(m_VScale(), m_ConstantInt(VScaleFactor)))) return VScaleFactor >= EC.getKnownMinValue(); return (EC.getKnownMinValue() == 1) && match(VLParam, m_VScale()); } |