[all-commits] [llvm/llvm-project] 06daa5: [AArch64] Don't remove free sext_inreg(vector_extr...
David Green via All-commits
all-commits at lists.llvm.org
Mon Feb 27 11:20:24 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 06daa515b27029885826833a5626937355abc4a1
https://github.com/llvm/llvm-project/commit/06daa515b27029885826833a5626937355abc4a1
Author: David Green <david.green at arm.com>
Date: 2023-02-27 (Mon, 27 Feb 2023)
Changed paths:
M llvm/include/llvm/CodeGen/TargetLowering.h
M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
M llvm/lib/Target/AArch64/AArch64ISelLowering.h
M llvm/test/CodeGen/AArch64/extract-sext-zext.ll
Log Message:
-----------
[AArch64] Don't remove free sext_inreg(vector_extract(x)) if it leads to multiple extracts
If we have sext_inreg(vector_extract(x)) but the top bits are not used, DAG
will try to remove the sext_inreg, using vector_extract(x) directly. This can
lead to multiple uses of both sext_inreg(vector_extract(x)) and
vector_extract(x), leading to the generation of both umov and smov extracts.
This adds a target hook to prevent that under AArch64 where the sext_inreg can
be considered free if there are multiple uses of the sext and no uses of the
vector_extract. This helps fix a small regression from D144550.
Differential Revision: https://reviews.llvm.org/D144850
More information about the All-commits
mailing list