[PATCH] D54546: [ARM] Don't expand sdiv

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 14 14:40:52 PST 2018


efriedma added a comment.

> But this is suboptimial for minimum code size, so instead we just generate a MOV and a SDIV.

This saves two bytes, if I'm following correctly?



================
Comment at: test/CodeGen/ARM/sdiv-opt-size.ll:3
+; RUN: llc -mtriple=thumbv7em %s -o - | FileCheck %s
+; RUN: llc -mtriple=thumbv8 %s -o - | FileCheck %s
+
----------------
What happens for targets that don't have an sdiv instruction? (For example, thumbv6m.)


https://reviews.llvm.org/D54546





More information about the llvm-commits mailing list