[llvm] [InstCombine] Canonicalize fcmp with inf (PR #80986)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 07:17:05 PST 2024


================
@@ -177,6 +177,16 @@ define i1 @oge_pinf_fmf(half %x) {
   ret i1 %cmp
 }
 
+define <2 x i1> @olt_pinf_vec(<2 x half> %x) {
+; CHECK-LABEL: define <2 x i1> @olt_pinf_vec(
+; CHECK-SAME: <2 x half> [[X:%.*]]) {
+; CHECK-NEXT:    [[CMP:%.*]] = fcmp one <2 x half> [[X]], <half 0xH7C00, half 0xH7C00>
+; CHECK-NEXT:    ret <2 x i1> [[CMP]]
+;
+  %cmp = fcmp olt <2 x half> %x, <half 0xH7c00, half 0xH7c00>
----------------
dtcxzyw wrote:

Done.

https://github.com/llvm/llvm-project/pull/80986


More information about the llvm-commits mailing list