[PATCH] D37999: InstSimplify: Constant fold some canonicalizes

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 14:19:01 PDT 2017


arsenm created this revision.
Herald added a subscriber: wdng.

+/-0 is obviously foldable. Other non-special, non-subnormal
values are also probably OK.

      

Also folds undef to 0, even though based on the users it
may make more sense to fold to 1 (e.g. fmul fast x, canonicalize(undef))


https://reviews.llvm.org/D37999

Files:
  include/llvm/IR/Constants.h
  lib/Analysis/InstructionSimplify.cpp
  lib/IR/Constants.cpp
  test/Transforms/InstCombine/maxnum.ll
  test/Transforms/InstCombine/minnum.ll
  test/Transforms/InstSimplify/canonicalize.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37999.115720.patch
Type: text/x-patch
Size: 6916 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170918/e157a10a/attachment.bin>


More information about the llvm-commits mailing list