[PATCH] D52324: [ValueTracking] Allow select patterns to work on vectors in more places
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 26 14:23:38 PDT 2018
aheejin added inline comments.
================
Comment at: unittests/Analysis/ValueTrackingTest.cpp:177
+ // The lane that contains a NaN (0x7ff80...) behaves like fminnum and the
+ // other lines behave like fminnan, so check that neither is returned.
+ expectPattern({SPF_UNKNOWN, SPNB_NA, false});
----------------
`fminnum` and `fminnan` are SelectionDAG terms, so I guess it would be better to describe in terms of `SPNB_RETURNS_NAN` and `SPNB_RETURNS_OTHER` here.
================
Comment at: unittests/Analysis/ValueTrackingTest.cpp:193
+ expectPattern({SPF_UNKNOWN, SPNB_NA, false});
+}
+
----------------
Can we have a few more test cases? I understand here you omitted very basic ones and put only a bit tricky cases that arises from the fact we are dealing with vectors, but having basic ones wouldn't hurt and help understanding. Such as, 1. ordered comparison that results in `SPNB_RETURNS_OTHER` 2. unordered comparison in which the right hand side is all NaNs
Repository:
rL LLVM
https://reviews.llvm.org/D52324
More information about the llvm-commits
mailing list