[PATCH] D46760: [InstCombine] Enhance narrowUDivURem.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 11 10:20:12 PDT 2018
lebedev.ri added a reviewer: spatel.
lebedev.ri added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:948
+
+ if (CanConvert) {
// If the constant is the same in the smaller type, use the narrow version.
----------------
I'd guess it would be simpler to use early return.
================
Comment at: test/Transforms/InstCombine/udivrem-change-width.ll:88
+ %udiv = udiv i64 %za, 33
+ %urem = urem i64 %za, 33
+ %uadd = add i64 %udiv, %urem
----------------
Add a second test with different constant that could be transformed still, but isn't.
Repository:
rL LLVM
https://reviews.llvm.org/D46760
More information about the llvm-commits
mailing list