[PATCH] D84655: [InstSimplify] fold min/max intrinsics using icmp simplification

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 27 14:04:22 PDT 2020


spatel updated this revision to Diff 281049.
spatel added a comment.

Patch updated:
Bail out if the would-be constant result is not safe. Not sure if this goes far enough. We still manage to fold 1 of the partial undef tests because the icmp analysis allows it and we are returning a non-constant value in that case.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84655/new/

https://reviews.llvm.org/D84655

Files:
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/test/Transforms/InstSimplify/maxmin_intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84655.281049.patch
Type: text/x-patch
Size: 12985 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200727/e5d478da/attachment.bin>


More information about the llvm-commits mailing list