From 24f14993e8743a4944756a8acc68d8c6fa7de9a6 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 4 Feb 2019 23:41:59 +0000 Subject: GlobalISel: Combine g_extract with g_merge_values Try to use the underlying source registers. This enables legalization in more cases where some irregular operations are widened and others narrowed. This seems to make the test_combines_2 AArch64 test worse, since the MERGE_VALUES has multiple uses. Since this should be required for legalization, a hasOneUse check is probably inappropriate (or maybe should only be used if the merge is legal?). llvm-svn: 353121 --- llvm/lib/CodeGen/GlobalISel/Legalizer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib') diff --git a/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp b/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp index b96827bd857..02fa4d12038 100644 --- a/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp +++ b/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp @@ -76,6 +76,7 @@ static bool isArtifact(const MachineInstr &MI) { case TargetOpcode::G_UNMERGE_VALUES: case TargetOpcode::G_CONCAT_VECTORS: case TargetOpcode::G_BUILD_VECTOR: + case TargetOpcode::G_EXTRACT: return true; } } -- cgit v1.2.3