[all-commits] [llvm/llvm-project] 0353c2: [InstCombine] fold shuffles with FP<->Int cast ope...
Sanjay Patel via All-commits
all-commits at lists.llvm.org
Tue May 10 11:28:45 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0353c2c996c5863463c356de97c9852f9330ed11
https://github.com/llvm/llvm-project/commit/0353c2c996c5863463c356de97c9852f9330ed11
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2022-05-10 (Tue, 10 May 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
M llvm/test/Transforms/InstCombine/vec_shuffle.ll
Log Message:
-----------
[InstCombine] fold shuffles with FP<->Int cast operands
shuffle (cast X), (cast Y), Mask --> cast (shuffle X, Y, Mask)
This is similar to a recent transform with fneg ( b331a7ebc1e0 ),
but this is intentionally the most conservative first step to
try to avoid regressions in codegen. There are several
restrictions that could be removed as follow-up enhancements.
Note that a cast with a unary shuffle is currently canonicalized
in the other direction (shuffle after cast - D103038 ). We might
want to invert that to be consistent with this patch.
More information about the All-commits
mailing list