[MIPatternMatch] Add m_OneNonDBGUse
authorJessica Paquette <jpaquette@apple.com>
Thu, 14 Jan 2021 19:09:46 +0000 (11:09 -0800)
committerJessica Paquette <jpaquette@apple.com>
Fri, 15 Jan 2021 18:18:46 +0000 (10:18 -0800)
commitcc90d41945f6c72d92fbbc6e7b38ceff6e7e1e93
tree841b4e7992ff13263735172374271aa639d9cd7f
parentf5abf0bd485a1fa7e332f5f8266c25755d385a8a
[MIPatternMatch] Add m_OneNonDBGUse

Add a matcher that checks if the given subpattern has only one non-debug use.

Also improve existing m_OneUse testcase.

Differential Revision: https://reviews.llvm.org/D94705
llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
llvm/unittests/CodeGen/GlobalISel/PatternMatchTest.cpp