There are two ctlz intrinsics here with the zero_is_poison flag
set. There are also two comparisons that check if either of the
inputs the ctlzs are zero. We need to use a logical or to block
the poison from the ctlz if either of the inputs is zero.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/lib/Transforms/Utils/IntegerDivision.cpp | ||
---|---|---|
244 | I think you actually need to freeze the inputs here. Otherwise an undef value could be picked to be non-zero here and zero in the ctlz call. |
llvm/lib/Transforms/Utils/IntegerDivision.cpp | ||
---|---|---|
150 | Should Dividend and Divisor here be frozen to address the comment? |
llvm/lib/Transforms/Utils/IntegerDivision.cpp | ||
---|---|---|
150 | I don't understand the question. I froze them on line 256 and 257. Do you think they should be frozen earlier int he function or in a different basic block? |
llvm/test/CodeGen/AMDGPU/srem64.ll | ||
---|---|---|
1023–1027 | These are all small improvements |
llvm/lib/Transforms/Utils/IntegerDivision.cpp | ||
---|---|---|
150 | Oops, I missed the updates at 256, 257, sorry for this. |
clang-format not found in user’s local PATH; not linting file.