diff --git a/analysis/statistics/658fcc1fa3686f0d5fee443c41ef15f6cc736acf.txt b/analysis/statistics/658fcc1fa3686f0d5fee443c41ef15f6cc736acf.txt new file mode 100644 index 000000000..f689dae67 --- /dev/null +++ b/analysis/statistics/658fcc1fa3686f0d5fee443c41ef15f6cc736acf.txt @@ -0,0 +1,46 @@ + +changeset: 1431:658fcc1fa3686f0d5fee443c41ef15f6cc736acf +char kNewtonVersion[] = "0.3-alpha-1431 (658fcc1fa3686f0d5fee443c41ef15f6cc736acf) (build 02-25-2023-15:38-pei@pei-G5-5500-Linux-5.19.0-32-generic-x86_64)"; +\n./src/noisy/noisy-linux-EN -O0 applications/noisy/helloWorld.n -s +\n./src/newton/newton-linux-EN -v 0 -eP applications/newton/invariants/ViolinWithTemperatureDependence-pigroups.nt + +Informational Report: +--------------------- +Invariant "ViolinWithTemperatureDependenceForPiGroups" has 2 unique kernels, each with 2 column(s)... + + Kernel 0 is a valid kernel: + + 1 1 + -0.5 -0 + 1 0 + 0.5 0 + 0 -1 + -0 -1 + + + The ordering of parameters is: P1 P0 P3 P2 P4 P5 + + Pi group 0, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^( 0) P5^(-0) + + Pi group 0, Pi 1 is: P0^(-0) P1^( 1) P2^( 0) P3^( 0) P4^(-1) P5^(-1) + + + Kernel 1 is a valid kernel: + + 1 0 + -0.5 1 + 1 -2 + 0.5 -1 + -0 -2 + 0 -2 + + + The ordering of parameters is: P1 P0 P3 P2 P4 P5 + + Pi group 1, Pi 0 is: P0^(-0.5) P1^( 1) P2^(0.5) P3^( 1) P4^(-0) P5^( 0) + + Pi group 1, Pi 1 is: P0^( 1) P1^( 0) P2^(-1) P3^(-2) P4^(-2) P5^(-2) + + + + diff --git a/src/newton/newton-irPass-LLVMIR-rangeAnalysis.cpp b/src/newton/newton-irPass-LLVMIR-rangeAnalysis.cpp index 03995379b..a4fdbd7a6 100644 --- a/src/newton/newton-irPass-LLVMIR-rangeAnalysis.cpp +++ b/src/newton/newton-irPass-LLVMIR-rangeAnalysis.cpp @@ -2079,8 +2079,7 @@ rangeAnalysis(State * N, llvm::Function & llvmIrFunction, BoundInfo * boundInfo, assert(false); } boundInfo->virtualRegisterRange.emplace(llvmIrBinaryOperator, - std::make_pair((int)vrRangeIt->second.first << constValue, - (int)vrRangeIt->second.second << constValue)); + std::make_pair(resMin, resMax)); } else { @@ -2148,7 +2147,6 @@ rangeAnalysis(State * N, llvm::Function & llvmIrFunction, BoundInfo * boundInfo, static_cast(leftMin) >> static_cast(rightMax)), static_cast(leftMax) >> static_cast(rightMin)), static_cast(leftMax) >> static_cast(rightMax)); - int a = 0; } else { @@ -2320,37 +2318,35 @@ rangeAnalysis(State * N, llvm::Function & llvmIrFunction, BoundInfo * boundInfo, if (vrRangeIt != boundInfo->virtualRegisterRange.end()) { double rightMin = 0, rightMax = 0; - rightMin = vrRangeIt->second.first; - rightMax = vrRangeIt->second.second; -// switch (bitWidth) -// { -// case 8: -// rightMin = static_cast(vrRangeIt->second.first); -// rightMax = static_cast(vrRangeIt->second.second); -// break; -// case 16: -// rightMin = static_cast(vrRangeIt->second.first); -// rightMax = static_cast(vrRangeIt->second.second); -// break; -// case 32: -// rightMin = static_cast(vrRangeIt->second.first); -// rightMax = static_cast(vrRangeIt->second.second); -// break; -// case 64: -// rightMin = static_cast(vrRangeIt->second.first); -// rightMax = static_cast(vrRangeIt->second.second); -// break; -// default: -// assert(false); -// } - lowerBound = min(min(min((int64_t)leftMin >> (uint64_t)rightMin, - (int64_t)leftMin >> (uint64_t)rightMax), - (int64_t)leftMax >> (uint64_t)rightMin), - (int64_t)leftMax >> (uint64_t)rightMax); - upperBound = max(max(max((int64_t)leftMin >> (uint64_t)rightMin, - (int64_t)leftMin >> (uint64_t)rightMax), + switch (bitWidth) + { + case 8: + rightMin = static_cast(vrRangeIt->second.first); + rightMax = static_cast(vrRangeIt->second.second); + break; + case 16: + rightMin = static_cast(vrRangeIt->second.first); + rightMax = static_cast(vrRangeIt->second.second); + break; + case 32: + rightMin = static_cast(vrRangeIt->second.first); + rightMax = static_cast(vrRangeIt->second.second); + break; + case 64: + rightMin = static_cast(vrRangeIt->second.first); + rightMax = static_cast(vrRangeIt->second.second); + break; + default: + assert(false); + } + lowerBound = min(min(min((uint64_t)leftMin >> (uint64_t)rightMin, + (uint64_t)leftMin >> (uint64_t)rightMax), + (uint64_t)leftMax >> (uint64_t)rightMin), + (uint64_t)leftMax >> (uint64_t)rightMax); + upperBound = max(max(max((uint64_t)leftMin >> (uint64_t)rightMin, + (uint64_t)leftMin >> (uint64_t)rightMax), (int64_t)leftMax >> (uint64_t)rightMin), - (int64_t)leftMax >> (uint64_t)rightMax); + (uint64_t)leftMax >> (uint64_t)rightMax); } else {