From bc76dadb3cf16c38564ccb1cc54206279b7c54bc Mon Sep 17 00:00:00 2001 From: Sam Parker Date: Tue, 3 Dec 2019 11:00:32 +0000 Subject: [CodeGen] Move ARMCodegenPrepare to TypePromotion Convert ARMCodeGenPrepare into a generic type promotion pass by: - Removing the insertion of arm specific intrinsics to handle narrow types as we weren't using this. - Removing ARMSubtarget references. - Now query a generic TLI object to know which types should be promoted and what they should be promoted to. - Move all codegen tests into Transforms folder and testing using opt and not llc, which is how they should have been written in the first place... The pass searches up from icmp operands in an attempt to safely promote types so we can avoid generating unnecessary unsigned extends during DAG ISel. Differential Revision: https://reviews.llvm.org/D69556 --- llvm/lib/CodeGen/CodeGen.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/CodeGen/CodeGen.cpp') diff --git a/llvm/lib/CodeGen/CodeGen.cpp b/llvm/lib/CodeGen/CodeGen.cpp index 85696ccc482..20fc67cc66a 100644 --- a/llvm/lib/CodeGen/CodeGen.cpp +++ b/llvm/lib/CodeGen/CodeGen.cpp @@ -105,6 +105,7 @@ void llvm::initializeCodeGen(PassRegistry &Registry) { initializeTailDuplicatePass(Registry); initializeTargetPassConfigPass(Registry); initializeTwoAddressInstructionPassPass(Registry); + initializeTypePromotionPass(Registry); initializeUnpackMachineBundlesPass(Registry); initializeUnreachableBlockElimLegacyPassPass(Registry); initializeUnreachableMachineBlockElimPass(Registry); -- cgit v1.2.3