[GlobalISel] Mark mi_match as nodiscard
authorJessica Paquette <jpaquette@apple.com>
Fri, 7 Oct 2022 21:33:51 +0000 (14:33 -0700)
committerJessica Paquette <jpaquette@apple.com>
Fri, 7 Oct 2022 22:47:05 +0000 (15:47 -0700)
commit42cb2f8b1298835575a839e184d738086c22c766
tree9bd74cceadfc58c9957165ad14db2da25f12c348
parent7c57a37c305debd55b9acc1e91205a438c960c7c
[GlobalISel] Mark mi_match as nodiscard

Typically when you match something, you want to check the result.

Fix a couple warnings in the AMDGPUPostLegalizerCombiner which appear as a
result of this.

Differential Revision: https://reviews.llvm.org/D135491
llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp