1 //=- AArch64.td - Define AArch64 Combine Rules ---------------*- tablegen -*-=//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 //===----------------------------------------------------------------------===//
12 include "llvm/Target/GlobalISel/Combine.td"
14 def fconstant_to_constant : GICombineRule<
16 (match (wip_match_opcode G_FCONSTANT):$root,
17 [{ return matchFConstantToConstant(*${root}, MRI); }]),
18 (apply [{ applyFConstantToConstant(*${root}); }])>;
20 def AArch64PreLegalizerCombinerHelper: GICombinerHelper<
21 "AArch64GenPreLegalizerCombinerHelper", [all_combines,
22 elide_br_by_inverting_cond,
23 fconstant_to_constant]> {
24 let DisableRuleOption = "aarch64prelegalizercombiner-disable-rule";