diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2018-06-03 07:21:32 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-06-03 07:21:32 +0000 |
commit | a00bdadbdaaf3f9a2fe41bf2bdb214d9c9384cfd (patch) | |
tree | 06d97b0614ac71e5667d0c65948372c4848272c7 | |
parent | 367b59eff1ef626460343fe5ccf9a08f2a93ca21 (diff) | |
parent | b71a6853524fd0cb985b8126b8dbc96e3a7d918b (diff) | |
download | art-a00bdadbdaaf3f9a2fe41bf2bdb214d9c9384cfd.tar.gz |
Snap for 4818534 from b71a6853524fd0cb985b8126b8dbc96e3a7d918b to pi-release
Change-Id: I3ddfdd6e54f22bb8a4578b199f544387b014b22d
-rw-r--r-- | compiler/optimizing/nodes_vector.h | 2 | ||||
-rw-r--r-- | test/623-checker-loop-regressions/src/Main.java | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/compiler/optimizing/nodes_vector.h b/compiler/optimizing/nodes_vector.h index d1eaf5c366..20f6cf01ed 100644 --- a/compiler/optimizing/nodes_vector.h +++ b/compiler/optimizing/nodes_vector.h @@ -328,7 +328,7 @@ class HVecReplicateScalar FINAL : public HVecUnaryOperation { uint32_t dex_pc) : HVecUnaryOperation( kVecReplicateScalar, allocator, scalar, packed_type, vector_length, dex_pc) { - DCHECK(!scalar->IsVecOperation()); + DCHECK(!ReturnsSIMDValue(scalar)); } // A replicate needs to stay in place, since SIMD registers are not diff --git a/test/623-checker-loop-regressions/src/Main.java b/test/623-checker-loop-regressions/src/Main.java index 4e2b241fd7..ff6e335b7f 100644 --- a/test/623-checker-loop-regressions/src/Main.java +++ b/test/623-checker-loop-regressions/src/Main.java @@ -584,6 +584,18 @@ public class Main { s24 + s25 + s26 + s27 + s28 + s29 + s30 + s31; } + public static int reductionIntoReplication() { + int[] a = { 1, 2, 3, 4 }; + int x = 0; + for (int i = 0; i < 4; i++) { + x += a[i]; + } + for (int i = 0; i < 4; i++) { + a[i] = x; + } + return a[3]; + } + public static void main(String[] args) { System.loadLibrary(args[0]); @@ -767,6 +779,8 @@ public class Main { expectEquals(85800, reduction32Values(a1, a2, a3, a4)); } + expectEquals(10, reductionIntoReplication()); + System.out.println("passed"); } |