Skip to content

Commit

Permalink
Merge pull request #650 from phillipstanleymarbell/issue-649
Browse files Browse the repository at this point in the history
Issue 649 Bug fix for type shrinkage
  • Loading branch information
PeiMu authored Apr 26, 2023
2 parents 57f9bf8 + 9f2f8e5 commit 3c4cf38
Show file tree
Hide file tree
Showing 6 changed files with 256 additions and 29 deletions.
46 changes: 46 additions & 0 deletions analysis/statistics/36973cf68bd6b73c26564c0b3ef7f4aebe79ebcb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

changeset: 1473:36973cf68bd6b73c26564c0b3ef7f4aebe79ebcb
char kNewtonVersion[] = "0.3-alpha-1473 (36973cf68bd6b73c26564c0b3ef7f4aebe79ebcb) (build 03-28-2023-17:[email protected]_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)




46 changes: 46 additions & 0 deletions analysis/statistics/5fccee26b648fe33ecff0ee69f5ecd36a90a35f8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

changeset: 1474:5fccee26b648fe33ecff0ee69f5ecd36a90a35f8
char kNewtonVersion[] = "0.3-alpha-1474 (5fccee26b648fe33ecff0ee69f5ecd36a90a35f8) (build 03-28-2023-17:[email protected]_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)




46 changes: 46 additions & 0 deletions analysis/statistics/c3a5ad745446621fc489b9edceb78c9b4cab6521.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

changeset: 1471:c3a5ad745446621fc489b9edceb78c9b4cab6521
char kNewtonVersion[] = "0.3-alpha-1471 (c3a5ad745446621fc489b9edceb78c9b4cab6521) (build 03-28-2023-12:[email protected]_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)




46 changes: 46 additions & 0 deletions analysis/statistics/ef8edf5668d9e039fce519d3665de0a0e1121ab0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

changeset: 1472:ef8edf5668d9e039fce519d3665de0a0e1121ab0
char kNewtonVersion[] = "0.3-alpha-1472 (ef8edf5668d9e039fce519d3665de0a0e1121ab0) (build 03-28-2023-16:[email protected]_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)




7 changes: 6 additions & 1 deletion src/newton/newton-irPass-LLVMIR-rangeAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2129,8 +2129,13 @@ rangeAnalysis(State * N, llvm::Function & llvmIrFunction, BoundInfo * boundInfo,
default:
assert(false);
}
/*
* lhs of shl can be negative, but the result should be positive.
* so we need to further check the real min value and real max value
* */
boundInfo->virtualRegisterRange.emplace(llvmIrBinaryOperator,
std::make_pair(resMin, resMax));
std::make_pair(min(resMin, resMax),
max(resMin, resMax)));
}
else
{
Expand Down
Loading

0 comments on commit 3c4cf38

Please sign in to comment.