diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2018-03-14 17:31:08 +0000 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2018-03-14 17:31:08 +0000 |
commit | 978aae761422e97620a2d9bebe52cd6f4b963a4b (patch) | |
tree | e5db0ce24bdf3771a1f7b654ea95e16974954184 /lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py | |
parent | 6ab60358ca6395da47d85c8368798e7c93f2c3ba (diff) | |
download | bcm5719-llvm-978aae761422e97620a2d9bebe52cd6f4b963a4b.tar.gz bcm5719-llvm-978aae761422e97620a2d9bebe52cd6f4b963a4b.zip |
[InstSimplify] [NFC] Add tests for peeking through unsigned FP casts for sign compares (PR36682)
Summary:
This pattern came up in PR36682 / D44390
https://bugs.llvm.org/show_bug.cgi?id=36682
https://reviews.llvm.org/D44390
https://godbolt.org/g/oKvT5H
Looking at the IR pattern in question, as per [[ https://github.com/rutgers-apl/alive-nj | alive-nj ]], for all the type combinations i checked
(input: `i16`, `i32`, `i64`; intermediate: `half`/`i16`, `float`/`i32`, `double`/`i64`)
for the following `icmp` comparisons the `uitofp`+`bitcast`+`icmp` can be evaluated to a boolean:
* `slt 0`
* `sgt -1`
I did not check vectors, but i'm guessing it's the same there.
{F5889242}
Thus all these cases are in the testcase (along with the vector variant with additional `undef` element in the middle).
There are no negative patterns here (unless alive-nj lied/is broken), all of these should be optimized.
Reviewers: spatel, majnemer, efriedma, arsenm
Reviewed By: spatel
Subscribers: wdng, llvm-commits
Differential Revision: https://reviews.llvm.org/D44421
llvm-svn: 327535
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py')
0 files changed, 0 insertions, 0 deletions