From a28ab99d8beb5242825252185a007139af08598f Mon Sep 17 00:00:00 2001 From: Pei Mu Date: Fri, 10 Mar 2023 16:25:30 +0000 Subject: [PATCH] we shouldn't remove srcInst, as it may be used in the latter instructions Addresses #647. --- ...0700370db2c9525d38ff28c6842740a789dc0b.txt | 46 +++++++++++++++++++ ...newton-irPass-LLVMIR-shrinkTypeByRange.cpp | 1 - 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 analysis/statistics/380700370db2c9525d38ff28c6842740a789dc0b.txt diff --git a/analysis/statistics/380700370db2c9525d38ff28c6842740a789dc0b.txt b/analysis/statistics/380700370db2c9525d38ff28c6842740a789dc0b.txt new file mode 100644 index 000000000..fab118c31 --- /dev/null +++ b/analysis/statistics/380700370db2c9525d38ff28c6842740a789dc0b.txt @@ -0,0 +1,46 @@ + +changeset: 1449:380700370db2c9525d38ff28c6842740a789dc0b +char kNewtonVersion[] = "0.3-alpha-1449 (380700370db2c9525d38ff28c6842740a789dc0b) (build 03-10-2023-16:22-pei@pei-G5-5500-Linux-5.19.0-35-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-shrinkTypeByRange.cpp b/src/newton/newton-irPass-LLVMIR-shrinkTypeByRange.cpp index 1e755b109..ea8644581 100644 --- a/src/newton/newton-irPass-LLVMIR-shrinkTypeByRange.cpp +++ b/src/newton/newton-irPass-LLVMIR-shrinkTypeByRange.cpp @@ -1609,7 +1609,6 @@ mergeCast(State * N, Function & llvmIrFunction, llvmIrInstruction->replaceAllUsesWith(newCastInst); sourceInstVec.emplace_back(newCastInst); } - sourceInst->removeFromParent(); llvmIrInstruction->removeFromParent(); } else