[PATCH] [ValueTracking] Fix PR23011.
Nick Lewycky
nicholas at mxc.ca
Wed Mar 25 00:40:33 PDT 2015
================
Comment at: lib/Analysis/ValueTracking.cpp:1937
@@ +1936,3 @@
+ // the number of sign bits is MIN(CLZ(C-1), CLO(-C+1)).
+ //
+
----------------
Blank comment line.
================
Comment at: lib/Analysis/ValueTracking.cpp:1941
@@ -1935,1 +1940,3 @@
+ unsigned WhenNegative = (-(*Denominator) + 1).countLeadingOnes();
+ unsigned ResBits = std::min(WhenPositive, WhenNegative);
----------------
Is this ever different from Denominator.ceilLogBase2()?
================
Comment at: test/Analysis/ValueTracking/pr230011.ll:1
@@ +1,2 @@
+; RUN: opt -indvars -S < %s | FileCheck %s
+
----------------
File name is off "pr230011.ll" should be "pr23011.ll".
Also, if this is a bug in value tracking, isn't there a more direct way to observe it than this? Maybe just srem + and and then opt -instsimplify?
http://reviews.llvm.org/D8600
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list