summary refs log tree commit diff stats
path: root/gitlab/issues/target_ppc/host_missing/accel_TCG/852.toml
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/issues/target_ppc/host_missing/accel_TCG/852.toml')
-rw-r--r--gitlab/issues/target_ppc/host_missing/accel_TCG/852.toml41
1 files changed, 41 insertions, 0 deletions
diff --git a/gitlab/issues/target_ppc/host_missing/accel_TCG/852.toml b/gitlab/issues/target_ppc/host_missing/accel_TCG/852.toml
new file mode 100644
index 000000000..f4006223c
--- /dev/null
+++ b/gitlab/issues/target_ppc/host_missing/accel_TCG/852.toml
@@ -0,0 +1,41 @@
+id = 852
+title = "ppc64le: possible SIMD issue casting double to int"
+state = "closed"
+created_at = "2022-02-01T21:40:52.901Z"
+closed_at = "2022-03-21T15:27:21.718Z"
+labels = ["Closed::Fixed", "accel: TCG", "target: ppc"]
+url = "https://gitlab.com/qemu-project/qemu/-/issues/852"
+host-os = "Debian 11 \"bullseye\""
+host-arch = "x86_64"
+qemu-version = "6.1.0"
+guest-os = "Debian unstable \"sid\""
+guest-arch = "ppc64le"
+description = """Working with numpy in a ppc64le VM, I ran into a strange double -to casting issue, specifically when casting an array of 1.0 values to 1 values. The numpy folks guided me to a small reproducible test case.
+
+The attached [convert.c](/uploads/2dd7936f4defccf816ffee7c7c002e77/convert.c) creates double and int arrays of length `1 <= n <= 16`. The double array is filled with the value 1.0, and both arrays are passed to a function that converts the value.
+
+With `-O2`, output is as expected (truncated here): 
+
+```
+i =  1:   1
+i =  2:   1 1
+i =  3:   1 1 1
+i =  4:   1 1 1 1
+i =  5:   1 1 1 1 1
+i =  6:   1 1 1 1 1 1
+```
+
+With `-O3`, all values that fit into blocks of four become zero:
+```
+i =  1:   1
+i =  2:   1 1
+i =  3:   1 1 1
+i =  4:   0 0 0 0
+i =  5:   0 0 0 0 1
+i =  6:   0 0 0 0 1 1
+```
+
+I tested this with executables compiled on a physical ppc64le host, where the issue is not reproducible."""
+reproduce = """1. `gcc -O2 -o convert convert.c && ./convert`
+2. `gcc -O3 -o convert convert.c && ./convert`"""
+additional = "n/a"