[PATCH] D53774: [InstCombine] Combine nested min/max intrinsics with constants

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 30 14:51:14 PDT 2018


spatel added a comment.

Is it worth adjusting/adding some tests with NaN constants?



================
Comment at: test/Transforms/InstCombine/maxnum.ll:177
 ; CHECK-LABEL: @maxnum_f32_p0_maxnum_val_n0(
-; CHECK-NEXT: [[Y:%.*]] = call float @llvm.maxnum.f32(float %x, float -0.000000e+00)
-; CHECK-NEXT: [[RES:%.*]] = call float @llvm.maxnum.f32(float [[Y]], float 0.000000e+00)
+; CHECK-NEXT: [[RES:%.*]] = call float @llvm.maxnum.f32(float %x, float 0.000000e+00)
 ; CHECK-NEXT: ret float [[RES]]
----------------
maxnum(0.0, -0.0) is unspecified, but consistent within LLVM, right? Ie, we should not get random test failures on this test and the similar minnum test.


https://reviews.llvm.org/D53774





More information about the llvm-commits mailing list