[PATCH] D79187: [DAGCombiner] fold (fp_round (int_to_fp X)) -> (int_to_fp X)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 1 17:17:09 PDT 2020
efriedma added a comment.
> Use hasOperation to ensure legality. This causes the optimisation not to happen for the testcase on on RV64*F, in this example, I think because i32 is not a legal type on that architecture. I'll follow-up this patch if I can get that working.
You could relax the check a bit; if `!LegalTypes`, you don't need to worry whether the operation is legal.
Actually, it might make sense to do this in instcombine instead of DAGCombine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79187/new/
https://reviews.llvm.org/D79187
More information about the llvm-commits
mailing list