[llvm] [PatternMatch] Refactor `m_SpecificInt` to avoid constructing APInt. NFC. (PR #86259)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 24 04:05:17 PDT 2024


dtcxzyw wrote:

> Should this be done for SDPatternMatch as well? I don't think MIPatternMatch has an equivalent though

SDPatternMatch always copies APInt :( We should refactor `ISD::isConstantSplatVector` first.

https://github.com/llvm/llvm-project/blob/4d69855e9d380ecb7c1f7a64c7b37258fe36f525/llvm/include/llvm/CodeGen/SDPatternMatch.h#L667-L688
https://github.com/llvm/llvm-project/blob/4d69855e9d380ecb7c1f7a64c7b37258fe36f525/llvm/include/llvm/CodeGen/SDPatternMatch.h#L695-L707

https://github.com/llvm/llvm-project/pull/86259


More information about the llvm-commits mailing list