[ValueTracking] Fix i1 abs range (PR62760)
authorNikita Popov <npopov@redhat.com>
Wed, 17 May 2023 10:20:21 +0000 (12:20 +0200)
committerNikita Popov <npopov@redhat.com>
Wed, 17 May 2023 10:31:13 +0000 (12:31 +0200)
commit9b7616856cbdd476aaf4553ccc74ab8c38c5f6ad
treec9c34bef6011fe87b3856dc04993cdfe3978075f
parent7d9f03f4d8e1d59da267a863e0018f2e172ca0f9
[ValueTracking] Fix i1 abs range (PR62760)

For i1 operations, we may end up returning an empty range instead
of a full one. Make sure to use the getNonEmpty constructor.

Fixes https://github.com/llvm/llvm-project/issues/62760.
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Transforms/InstSimplify/abs_intrinsic.ll
llvm/test/Transforms/InstSimplify/call.ll