[PATCH] D44909: [DAGCombine] (float)((int) f) --> ftrunc (PR36617)
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 27 04:43:35 PDT 2018
dmgreen added a comment.
Thanks for adding the new test. LGTM
================
Comment at: test/CodeGen/ARM/ftrunc.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=armv7-eabi < %s | FileCheck %s
+
----------------
Mind adding a armv8 target too? It should be come up with something like a vrintz, if I'm understanding this correctly.
================
Comment at: test/CodeGen/ARM/ftrunc.ll:25
+; CHECK-NEXT: pop {r11, pc}
+ %i = fptoui double %x to i64
+ %r = uitofp i64 %i to double
----------------
This is fine as-is, but I think there are no double to i64 rounding in arm (there is aarch64), hence the aeabi calls. There will be a double to i32 and back, but this is definitely testing something sensible, and the armv8 target should show a big improvement :)
https://reviews.llvm.org/D44909
More information about the llvm-commits
mailing list