Revert "[InstCombine] `sext(trunc(x)) --> sext(x)` iff trunc is NSW (PR49543)"
authorRoman Lebedev <lebedev.ri@gmail.com>
Tue, 20 Apr 2021 22:10:10 +0000 (01:10 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Tue, 20 Apr 2021 22:11:15 +0000 (01:11 +0300)
commit5a654bfeab588715fa6d266a7789484850605a18
treee4e0ca9fd14803764b081674ea73b4374c855498
parent1e68d338c15e2c8aa4547dc8681016bc23464d89
Revert "[InstCombine] `sext(trunc(x)) --> sext(x)` iff trunc is NSW (PR49543)"

I forgot about the case where we sign-extend to width smaller than the original.

This reverts commit 1e6ca23ab8e350c7bab5d7f93e4d3dee18d180cc.
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/test/Transforms/InstCombine/sext-of-trunc-nsw.ll