diff options
author | Sanjay Patel <spatel@rotateright.com> | 2021-11-09 08:27:09 -0500 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2021-11-09 08:54:59 -0500 |
commit | c36b7e21bd8f04a44d6935c3469b1bcbbafeeb2d (patch) | |
tree | 35756b7f605bc9f17beddde1121d43e3de18cf58 /clang/lib/Basic/SourceManager.cpp | |
parent | 9c63adfb8be453e83fb03c134bfec772b103fc35 (diff) | |
download | llvm-c36b7e21bd8f04a44d6935c3469b1bcbbafeeb2d.zip llvm-c36b7e21bd8f04a44d6935c3469b1bcbbafeeb2d.tar.gz llvm-c36b7e21bd8f04a44d6935c3469b1bcbbafeeb2d.tar.bz2 |
[InstCombine] enhance vector bitwise select matching
(Cond & C) | (~bitcast(Cond) & D) --> bitcast (select Cond, (bc C), (bc D))
This is part of fixing:
https://llvm.org/PR34047
That report shows a case where a bitcast is sitting between the select condition
candidate and its 'not' value due to current cast canonicalization rules.
There's a bitcast type restriction that might be violated in existing matching,
but I still need to investigate if that is possible -
Alive2 shows we can only do this transform safely when the bitcast is from
narrow to wide vector elements (otherwise poison could leak into elements
that were safe in the original code):
https://alive2.llvm.org/ce/z/Hf66qh
Differential Revision: https://reviews.llvm.org/D113035
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions