[PATCH] D65017: [InstCombine] Teach foldOrOfICmps to allow icmp eq MIN_INT/MAX to be part of a range comparision. Similar for foldAndOfICmps
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 23 22:02:59 PDT 2019
craig.topper marked an inline comment as done.
craig.topper added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/and-or-icmps.ll:316
+; CHECK-NEXT: [[TMP1:%.*]] = icmp ugt i32 [[X_OFF]], 2147483645
+; CHECK-NEXT: ret i1 [[TMP1]]
;
----------------
nikic wrote:
> This seems like a weird choice that the range check code is making. We could also generate
>
> ```
> %x.off = add i32 %x, 1
> %c = icmp ult i32 %x.off, -2147483646
> ```
>
> with smaller constants.
Is this something this patch should address?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65017/new/
https://reviews.llvm.org/D65017
More information about the llvm-commits
mailing list