[llvm] [AMDGPU][AggressiveInstCombine] Narrow 64 bit math to 32 bit if profitable (PR #130577)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 10 21:05:31 PDT 2025
Shoreshen wrote:
> > If `%x` is b'1000000 then sext(trunc(%x)) = b'11111...1000
>
> It is guarded by the assumption `sext(trunc(%x)) == %x` in `@src`.
Hi @dtcxzyw , I think this is a characteristic of `%x`, which we don't know at compilation.
If I'm not wrong, what we can get at compilation is from instruction `%tx = trunc nsw i16 %x to i7`, which is equivalent to `bitcast(and(%x, b'1111111) to i7)`, the value we can get is b'1111111.
https://github.com/llvm/llvm-project/pull/130577
More information about the llvm-commits
mailing list