[ControlHeightReduction] Add assert to avoid underflow (#116339)
commit42775a44c9a6ba8dc03ad4c88fa9321e78ebd434
authorWu Yingcong <yingcong.wu@intel.com>
Thu, 21 Nov 2024 06:13:08 +0000 (21 14:13 +0800)
committerGitHub <noreply@github.com>
Thu, 21 Nov 2024 06:13:08 +0000 (21 14:13 +0800)
treedc48f365c876d5c05de1f648c98286ac7263fee4
parent32913724acf9e02beed46999fee1424086b8c884
[ControlHeightReduction] Add assert to avoid underflow (#116339)

`NumCHRedBranches - 1` is used later, we should add an assertion to make
sure it will not underflow.
llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp