[PATCH] D34545: [AMDGPU] Simplify setcc (sext from i1 b), -1|0, cc

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 18:04:21 PDT 2017


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:5143
+    if ((CRHS->isAllOnesValue() &&
+         (CC == ISD::SETNE || CC == ISD::SETGT || CC == ISD::SETULT)) ||
+        (CRHS->isNullValue() &&
----------------
I don't think it is useful check the GT/LT cases. I would expect those to fold to eq/ne the bool value already


https://reviews.llvm.org/D34545





More information about the llvm-commits mailing list