[all-commits] [llvm/llvm-project] 3d3c0e: [InstSimplify] fold extractelement of splat with v...
RotateRight via All-commits
all-commits at lists.llvm.org
Mon Jul 5 05:21:42 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3d3c0ed9323ba387dd6030337c672d2c9c4816f0
https://github.com/llvm/llvm-project/commit/3d3c0ed9323ba387dd6030337c672d2c9c4816f0
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-07-05 (Mon, 05 Jul 2021)
Changed paths:
M llvm/lib/Analysis/InstructionSimplify.cpp
M llvm/test/Transforms/InstSimplify/extract-element.ll
M llvm/test/Transforms/InstSimplify/vscale-inseltpoison.ll
M llvm/test/Transforms/InstSimplify/vscale.ll
Log Message:
-----------
[InstSimplify] fold extractelement of splat with variable extract index
We already have a fold for variable index with constant vector,
but if we can determine a scalar splat value, then it does not
matter whether that value is constant or not.
We overlooked this fold in D102404 and earlier patches,
but the fixed vector variant is shown in:
https://llvm.org/PR50817
Alive2 agrees on that:
https://alive2.llvm.org/ce/z/HpijPC
The same logic applies to scalable vectors.
Differential Revision: https://reviews.llvm.org/D104867
More information about the All-commits
mailing list