From c0ea850bfb8dc5cfc3140c681859ec409bc9a395 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 17 Jan 2024 14:24:53 -0800 Subject: [PATCH] Disable auto-vectorization. Until https://gitlab.com/qemu-project/qemu/-/issues/1976 is fixed, this is just causing too much confusion and wasted time. Removing V from the architecture string has the same effect, but requires some code changes (to be able to compile code that's _explicitly_ using V), and makes it less obvious that this is just a temporary workaround for a qemu bug. Bug: http://b/320416684 Test: objdump Change-Id: Iec7d63ab227b31f82f530dabbdc4f3aa54277f04 --- cc/config/riscv64_device.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cc/config/riscv64_device.go b/cc/config/riscv64_device.go index 096401531..ac5f74cc8 100644 --- a/cc/config/riscv64_device.go +++ b/cc/config/riscv64_device.go @@ -29,6 +29,8 @@ var ( // Equivalent to "-munaligned-access", but our clang doesn't have that yet. "-Xclang -target-feature -Xclang +unaligned-scalar-mem", "-Xclang -target-feature -Xclang +unaligned-vector-mem", + // Until https://gitlab.com/qemu-project/qemu/-/issues/1976 is fixed... + "-fno-vectorize", } riscv64ArchVariantCflags = map[string][]string{}