[PATCH] D110170: [InstCombine] fold cast of right-shift if high bits are not demanded
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 24 06:16:48 PDT 2021
spatel added a comment.
In D110170#3019762 <https://reviews.llvm.org/D110170#3019762>, @uabelho wrote:
> In D110170#3019717 <https://reviews.llvm.org/D110170#3019717>, @uabelho wrote:
>
>> Just a heads-up, I'm seeing timeouts again now with "2nd try" commited.
>>
>> I'll see if I can pull out a reproducer working on main too.
>
> Ok:
>
> opt -o /dev/null -passes='instcombine' hang.ll
>
> with hang.ll being
>
> target datalayout = "n32"
>
> define i32 @f_t15_t01_t09(i40 %x) {
> entry:
> store i40 %x, i40* undef, align 1
> %0 = load i40, i40* undef, align 1
> %1 = add i40 %0, 2147483647
> %2 = select i1 undef, i40 %1, i40 %0
> %downscale = ashr i40 %2, 31
> %resize = trunc i40 %downscale to i16
> %resize1 = sext i16 %resize to i32
> %upscale = shl i32 %resize1, 31
> ret i32 %upscale
> }
Thanks! I'll step into this in the debugger now.
Let me know if I should revert.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110170/new/
https://reviews.llvm.org/D110170
More information about the llvm-commits
mailing list