[PATCH] D44421: [InstCombine] [NFC] Add tests for peeking through unsigned FP casts for sign compares (PR36682)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 13 14:01:40 PDT 2018
lebedev.ri added inline comments.
================
Comment at: test/Transforms/InstCombine/cast-unsigned-icmp-cmp-0.ll:8-11
+; FIXME: *all* of these are true tests.
+; *All* of these can be instcombine'd to a boolean:
+; * slt i32 %b, 0 -> false
+; * sgt i32 %b, -1 -> true
----------------
spatel wrote:
> If the result of the fold is a constant, then the test (and the transform) can go in InstSimplify rather than InstCombine.
> Also, as with my earlier comment, I appreciate the thorough testing, but I don't think we need 30+ tests of this fold. Some variation between data widths and vectors should give us enough coverage. There should be at least one vector test *without* undef in the zero constant because that shows a different result currently.
Ok, got it, will update patches accordingly.
Repository:
rL LLVM
https://reviews.llvm.org/D44421
More information about the llvm-commits
mailing list