[llvm] [GlobalISel] Combine G_MERGE_VALUES of x and undef (PR #113616)
Amara Emerson via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 24 22:38:11 PDT 2024
Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/113616 at github.com>
https://github.com/aemerson commented:
```
x(s8) = merge(0b1011, undef)
==>
x = sext(0b1011)
==>
x = 0b11111011
```
Why would that be an incorrect transformation if the upper bits were undef? Unless I'm missing something funny with poison, G_ANYEXT is the least restrictive and most optimizable output, since you're not defining bits that were previously undefined.
https://github.com/llvm/llvm-project/pull/113616
More information about the llvm-commits
mailing list