[PATCH] D50301: [InstCombine] De Morgan: sink 'not' into 'xor' (PR38446)

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 5 03:23:20 PDT 2018


lebedev.ri created this revision.
lebedev.ri added reviewers: spatel, craig.topper.

https://rise4fun.com/Alive/IT3

Comes up in the [most ugliest]  `signed int` -> `signed char`  case of
`-fsanitize=implicit-conversion` (https://reviews.llvm.org/D50250)
Previously, we were stuck with `not`: F6867736: old.ll <https://reviews.llvm.org/F6867736>
But now we are able to completely get rid of it: F6867737: new.ll <https://reviews.llvm.org/F6867737>
(FIXME: why are we loosing the metadata? that seems wrong/strange.)

Not sure if we want to do it always, or only when it is free to invert?


Repository:
  rL LLVM

https://reviews.llvm.org/D50301

Files:
  lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  test/Transforms/InstCombine/and-or-not.ll
  test/Transforms/InstCombine/demorgan-sink-not-into-xor.ll
  test/Transforms/InstCombine/or-xor.ll
  test/Transforms/InstCombine/set.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50301.159203.patch
Type: text/x-patch
Size: 12596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180805/14ac19cd/attachment.bin>


More information about the llvm-commits mailing list