[AArch64][SelectionDAG] fix infinite loop caused by legalizing & combining CONCAT_VECTORS
authorFLZ101 <zhangfenglei@huawei.com>
Tue, 27 Jun 2023 20:57:41 +0000 (13:57 -0700)
committerFangrui Song <i@maskray.me>
Tue, 27 Jun 2023 20:57:41 +0000 (13:57 -0700)
commit32e4013dd4003abe98d97d794600d0bd3a571018
tree0918381f06bbf423076536f4cb841610b8808e58
parentf58498399ba0c32114eea809d4744ef710923346
[AArch64][SelectionDAG] fix infinite loop caused by legalizing & combining CONCAT_VECTORS

Legalizing in `AArch64TargetLowering::LowerCONCAT_VECTORS()` and combining in `DAGCombiner::visitCONCAT_VECTORS()` could cause an infinite loop.
This commit fixes that issue by conditionally skipping the combining.

Fix https://github.com/llvm/llvm-project/issues/63322

Reviewed By: RKSimon, MaskRay

Differential Revision: https://reviews.llvm.org/D153316
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/dag-combine-concat-vectors.ll [new file with mode: 0644]