[DAGCombine] fold (sext (sext_inreg x)) -> (sext (trunc x))
authorAmaury Séchet <deadalnix@gmail.com>
Wed, 4 Jan 2023 15:17:35 +0000 (15:17 +0000)
committerAmaury Séchet <deadalnix@gmail.com>
Tue, 10 Jan 2023 20:33:02 +0000 (20:33 +0000)
commitc0d7f0ca0047dd61585e688313bac0467234c43e
treef90df5f522fffeef5bbd59a9658675bf9d6096f5
parent263d2fce557acaf82f53b377d0d4c0de16630d8b
[DAGCombine] fold (sext (sext_inreg x)) -> (sext (trunc x))

This fixes a regression introduced by D127115 in test/CodeGen/PowerPC/store-forward-be64.ll

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D140993
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/sdiv_fix.ll
llvm/test/CodeGen/X86/sdiv_fix_sat.ll