[all-commits] [llvm/llvm-project] 109cc5: [DAGCombine] Fold SRA of a load into a narrower si...
Björn Pettersson via All-commits
all-commits at lists.llvm.org
Tue Jan 25 03:28:24 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 109cc5adccaec4c2264c0db3d54bbec1183bf95d
https://github.com/llvm/llvm-project/commit/109cc5adccaec4c2264c0db3d54bbec1183bf95d
Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
Date: 2022-01-25 (Tue, 25 Jan 2022)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/test/CodeGen/PowerPC/pr13891.ll
M llvm/test/CodeGen/X86/combine-sra-load.ll
Log Message:
-----------
[DAGCombine] Fold SRA of a load into a narrower sign-extending load
An sra is basically sign-extending a narrower value. Fold away the
shift by doing a sextload of a narrower value, when it is legal to
reduce the load width accordingly.
Differential Revision: https://reviews.llvm.org/D116930
More information about the All-commits
mailing list