InstCombine: Fold compare with smallest normal if input denormals are flushed
Try to simplify comparisons with the smallest normalized value. If denormals will be treated as 0, we can simplify by using an equality comparison with 0. fcmp olt fabs(x), smallest_normalized_number -> fcmp oeq x, 0.0 fcmp ult fabs(x), smallest_normalized_number -> fcmp ueq x, 0.0 fcmp oge fabs(x), smallest_normalized_number -> fcmp one x, 0.0 fcmp ult fabs(x), smallest_normalized_number -> fcmp ueq x, 0.0 The device libraries have a few range checks that look like this for denormal handling paths.
Loading
Please sign in to comment