commit | b5eaa9c28c2c617373c74227d53e2422cb6db1f7 | [log] [tgz] |
---|---|---|
author | Roman Lebedev <lebedev.ri@gmail.com> | Wed Sep 12 18:19:43 2018 +0000 |
committer | Roman Lebedev <lebedev.ri@gmail.com> | Wed Sep 12 18:19:43 2018 +0000 |
tree | 618ec7727b17285f16e585897d576278b76ee318 | |
parent | e2b125cd4df2d0d220afc3aa7236b78ae317ad57 [diff] |
[InstCombine] Inefficient pattern for high-bits checking (PR38708) Summary: It is sometimes important to check that some newly-computed value is non-negative and only `n` bits wide (where `n` is a variable.) There are **many** ways to check that: https://godbolt.org/z/o4RB8D The last variant seems best? (I'm sure there are some other variations i haven't thought of..) Let's handle the second variant first, since it is much simpler. https://rise4fun.com/Alive/LYjY https://bugs.llvm.org/show_bug.cgi?id=38708 Reviewers: spatel, craig.topper, RKSimon Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D51985 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342067 91177308-0d34-0410-b5e6-96231b3b80d8