diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2022-06-21 15:08:39 +0100 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2022-06-21 15:10:43 +0100 |
commit | ac4cb1775b8f40be2809245b818993a576639c1f (patch) | |
tree | 6edc142b8e7459c10087ec570a8ee851fde0eb73 /llvm/unittests/Support/VirtualFileSystemTest.cpp | |
parent | beb8580544a2747d586e8e896f6fc1de63214fb9 (diff) | |
download | llvm-ac4cb1775b8f40be2809245b818993a576639c1f.zip llvm-ac4cb1775b8f40be2809245b818993a576639c1f.tar.gz llvm-ac4cb1775b8f40be2809245b818993a576639c1f.tar.bz2 |
[X86] fold (and (mul x, c1), c2) -> (mul x, (and c1, c2)) iff c2 is all/no bits mask
Noticed on D128216 - if we're zeroing out vector elements of a mul/mulh result then see if we can merge the and-mask into the mul by just multiplying by zero.
Ideally we'd make this generic (similar to the existing foldSelectWithIdentityConstant?), but these cases are appearing very late, after the constants have been lowered to constant-pool loads.
Diffstat (limited to 'llvm/unittests/Support/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions