[all-commits] [llvm/llvm-project] b04fc9: [ConstantRange] Fix nsw nowrap region for 1 bit in...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Tue Dec 6 07:38:00 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b04fc99c347058111cfb9313546df95e10c26132
https://github.com/llvm/llvm-project/commit/b04fc99c347058111cfb9313546df95e10c26132
Author: Nikita Popov <npopov at redhat.com>
Date: 2022-12-06 (Tue, 06 Dec 2022)
Changed paths:
M llvm/lib/IR/ConstantRange.cpp
M llvm/test/Transforms/CorrelatedValuePropagation/mul.ll
M llvm/unittests/IR/ConstantRangeTest.cpp
Log Message:
-----------
[ConstantRange] Fix nsw nowrap region for 1 bit integers (PR59301)
The special case for V=1 was incorrect for one bit types, where
1 is also -1. Remove it, and use getNonEmpty() to handle the full
range case instead.
Adjust the exhaustive nowrap tests to test both 5 bit and 1 bit
types.
Fixes https://github.com/llvm/llvm-project/issues/59301.
More information about the All-commits
mailing list