https://github.com/dtcxzyw approved this pull request. LGTM. I don't have a better idea for generalizing this pattern. Perhaps we can use `canEvaluateZExtd + EvaluateInDifferentType`. But it needs a hint for the wider bit width. https://github.com/llvm/llvm-project/pull/222592