Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/Target/GlobalISel/Combine.td
Context not available. | |||||
(apply [{ return Helper.replaceSingleDefInstWithReg(*${root}, ${matchinfo}); }]) | (apply [{ return Helper.replaceSingleDefInstWithReg(*${root}, ${matchinfo}); }]) | ||||
>; | >; | ||||
// Fold (fabs (fabs x)) -> (fabs x). | |||||
def fabs_fabs_fold_matchinfo : GIDefMatchData<"Register">; | |||||
def fabs_fabs_fold: GICombineRule< | |||||
(defs root:$root, fabs_fabs_fold_matchinfo:$matchinfo), | |||||
(match (wip_match_opcode G_FABS):$root, | |||||
[{ return Helper.matchCombineFAbsOfFAbs(*${root}, ${matchinfo}); }]), | |||||
(apply [{ return Helper.applyCombineFAbsOfFAbs(*${root}, ${matchinfo}); }]) | |||||
>; | |||||
// FIXME: These should use the custom predicate feature once it lands. | // FIXME: These should use the custom predicate feature once it lands. | ||||
def undef_combines : GICombineGroup<[undef_to_fp_zero, undef_to_int_zero, | def undef_combines : GICombineGroup<[undef_to_fp_zero, undef_to_int_zero, | ||||
undef_to_negative_one, | undef_to_negative_one, | ||||
Context not available. | |||||
shl_ashr_to_sext_inreg, sext_inreg_of_load, | shl_ashr_to_sext_inreg, sext_inreg_of_load, | ||||
width_reduction_combines, select_combines, | width_reduction_combines, select_combines, | ||||
known_bits_simplifications, ext_ext_fold, | known_bits_simplifications, ext_ext_fold, | ||||
not_cmp_fold, opt_brcond_by_inverting_cond]>; | not_cmp_fold, opt_brcond_by_inverting_cond, | ||||
fabs_fabs_fold]>; | |||||
Context not available. |