[llvm-commits] [gcc-plugin] r82547 - /gcc-plugin/trunk/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Tue Sep 22 07:47:21 PDT 2009
Author: baldrick
Date: Tue Sep 22 09:47:21 2009
New Revision: 82547
URL: http://llvm.org/viewvc/llvm-project?rev=82547&view=rev
Log:
Fix thinko introduced when converting from CALL_EXPR to
GIMPLE_CALL.
Modified:
gcc-plugin/trunk/llvm-convert.cpp
Modified: gcc-plugin/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-convert.cpp?rev=82547&r1=82546&r2=82547&view=diff
==============================================================================
--- gcc-plugin/trunk/llvm-convert.cpp (original)
+++ gcc-plugin/trunk/llvm-convert.cpp Tue Sep 22 09:47:21 2009
@@ -5146,7 +5146,7 @@
Value *ReadWrite = 0;
Value *Locality = 0;
- if (gimple_call_num_args(stmt) >= 1) { // Args 1/2 are optional
+ if (gimple_call_num_args(stmt) > 1) { // Args 1/2 are optional
ReadWrite = Emit(gimple_call_arg(stmt, 1), 0);
if (!isa<ConstantInt>(ReadWrite)) {
error("second argument to %<__builtin_prefetch%> must be a constant");
@@ -5160,7 +5160,7 @@
Type::getInt32Ty(Context), false);
}
- if (gimple_call_num_args(stmt) >= 2) {
+ if (gimple_call_num_args(stmt) > 2) {
Locality = Emit(gimple_call_arg(stmt, 2), 0);
if (!isa<ConstantInt>(Locality)) {
error("third argument to %<__builtin_prefetch%> must be a constant");
More information about the llvm-commits
mailing list