Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp | ||
---|---|---|
166 | Does the sign matter? | |
166–176 | Do we not have something for this in PatternMatch? | |
830 | Clarify if the sign of zero matters? | |
844–845 | Should check this case first since it's cheaper | |
844–845 | Actually, should we have a more general isKnownFiniteNonZero that happens to check constants? |
llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp | ||
---|---|---|
844–845 | Perhaps. ValueTracking has isKnownNonZero which doesn't work on floats, but could be made to. It also has CannotBeOrderedLessThanZero. isKnownFiniteNonZero seems rather specific to me. I realise it's probably more efficient than separate calls to isKnownNeverNaN, isKnownNeverInfinity and isKnownNonZero, but without a lot of refactoring I think there's a serious risk of having dozens of different entrypoints. As another data point, SelectionDAG has separate isKnownNeverZero and isKnownNeverZeroFloat functions. Anyway... I decided to duck all of this and just have it work on constants, for now. |
llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp | ||
---|---|---|
844–845 | Should add todo to generalize. I was also thinking all the isKnown* functions should return a bitmask, kind of like the inverse of the class intrinsic |
Does the sign matter?