[all-commits] [llvm/llvm-project] 771fd1: [DAG] Extend input types if needed in combineShift...
David Green via All-commits
all-commits at lists.llvm.org
Wed Jan 3 02:52:14 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 771fd1ad2a988e8bb586c2165d6877f06e5ed19b
https://github.com/llvm/llvm-project/commit/771fd1ad2a988e8bb586c2165d6877f06e5ed19b
Author: David Green <david.green at arm.com>
Date: 2024-01-03 (Wed, 03 Jan 2024)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
M llvm/test/CodeGen/AArch64/arm64-vhadd.ll
Log Message:
-----------
[DAG] Extend input types if needed in combineShiftToAVG. (#76791)
This atempts to fix #76734 which is a crash in invalid TRUNC nodes types
from unoptimized input code in combineShiftToAVG. The NVT can be VT if
the larger type was legal and the adds will not overflow, in which case
the inputs should be extended.
>From what I can tell this appears to be valid (if not optimal for this
case): https://alive2.llvm.org/ce/z/fRieHR
The result has also been changed to getExtOrTrunc in case that VT==NVT,
which is not handled by SEXT/ZEXT.
More information about the All-commits
mailing list