[InstCombine] Fix vscale zext/sext optimization when vscale_range is unbounded.
authorSander de Smalen <sander.desmalen@arm.com>
Wed, 4 Aug 2021 14:04:23 +0000 (15:04 +0100)
committerSander de Smalen <sander.desmalen@arm.com>
Wed, 4 Aug 2021 16:17:37 +0000 (17:17 +0100)
commitfe6ae81ef3644bf216c9ca8d2c90150cd9f83a57
treead7a7bffe81faecd532b592faf45ea575954d1cd
parente57e1e4e00264b77b2b35ad2bf419a48aecdd6bc
[InstCombine] Fix vscale zext/sext optimization when vscale_range is unbounded.

According to the LangRef, a (vscale_range) value of 0 means unbounded.

This patch additionally cleans up the test file vscale_sext_and_zext.ll.
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/test/Transforms/InstCombine/vscale_sext_and_zext.ll