[NFC][InstCombine] Tests for 'check for [no] signed truncation' pattern
authorRoman Lebedev <lebedev.ri@gmail.com>
Fri, 13 Jul 2018 20:33:34 +0000 (20:33 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Fri, 13 Jul 2018 20:33:34 +0000 (20:33 +0000)
commit4d22f15a2fc195dd7589bb3fd887f95a2720812f
treedcfe5debf0ee3f36b27870c763b9abac2a778900
parent9aab85a6a07f35a33fb703f40e3e87aca1a08735
[NFC][InstCombine] Tests for 'check for [no] signed truncation' pattern

[[ https://bugs.llvm.org/show_bug.cgi?id=38149 | PR38149 ]]

As discussed in https://reviews.llvm.org/D49179#1158957 and later,
the IR for 'check for [no] signed truncation' pattern can be improved:
https://rise4fun.com/Alive/gBf
^ that pattern will be produced by Implicit Integer Truncation sanitizer,
https://reviews.llvm.org/D48958 https://bugs.llvm.org/show_bug.cgi?id=21530
in signed case, therefore it is probably a good idea to improve it.

The DAGCombine will reverse this transform, see
https://reviews.llvm.org/D49266

llvm-svn: 337042
llvm/test/Transforms/InstCombine/canonicalize-lack-of-signed-truncation-check.ll [new file with mode: 0644]
llvm/test/Transforms/InstCombine/canonicalize-signed-truncation-check.ll [new file with mode: 0644]