[llvm] [GISel] Convert zext nneg to sext if it is cheaper (PR #93842)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 10:17:33 PDT 2024
dtcxzyw wrote:
> Why is the DAG doing this transform in the builder and not in the combiner?
>
> ```
> def nneg_zext : GICombineRule<
> (defs root:$root, build_fn_matchinfo:$matchinfo),
> (match (G_ZEXT $root, $x, (MIFlags NonNeg)),
> [{ return Helper.matchNonNegZext(${root}, ${matchinfo}); }]),
> (apply [{ Helper.applyBuildFnMO(${root}, ${matchinfo}); }])>;
> ```
@topperc
https://github.com/llvm/llvm-project/pull/93842
More information about the llvm-commits
mailing list