https://bugs.kde.org/show_bug.cgi?id=523626

--- Comment #3 from [email protected] ---
I've bisected the individual optimizations using -mllvm -opt-bisect-limit= (-1
to list them all - 22425 optimizations for -O3 in total) like this:

$ export L=14729
$ (clang -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../include -I../VEX/pub
-I../VEX/pub -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1
-DVGPV_x86_linux_vanilla=1  -I./priv  -m32 -O2 -mllvm -opt-bisect-limit=$L -g
-Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes
-Wmissing-declarations -Wno-unused-result -Wcast-align -Wcast-qual
-Wwrite-strings -Wempty-body -Wformat -Wformat-signedness -Wformat-security
-Wignored-qualifiers -Wenum-conversion -finline-functions -fno-stack-protector
-fno-strict-aliasing -fno-builtin -Wno-cast-align -Wno-self-assign
-Wno-tautological-compare   -fomit-frame-pointer  -Wbad-function-cast  -MT
priv/libvex_x86_linux_a-guest_x86_toIR.o -MD -MP -MF
priv/.deps/libvex_x86_linux_a-guest_x86_toIR.Tpo -c -o
priv/libvex_x86_linux_a-guest_x86_toIR.o `test -f 'priv/guest_x86_toIR.c' ||
echo './'`priv/guest_x86_toIR.c && make -C ..) |& tee xxx.log

and found the problematic optimization:

BISECT: running pass (14729) slp-vectorizer on g_calc_mpsadbw

And confirmed that disabling this optimization for guest_x86_toIR.c fixes the
problem (... -O2 -mllvm -opt-disable=slp-vectorizer ...) specifically:

$ (clang -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../include -I../VEX/pub
-I../VEX/pub -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1
-DVGPV_x86_linux_vanilla=1  -I./priv  -m32 -O2 -mllvm
-opt-disable=slp-vectorizer -g -Wall -Wmissing-prototypes -Wshadow
-Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-unused-result
-Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat
-Wformat-signedness -Wformat-security -Wignored-qualifiers -Wenum-conversion
-finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin
-Wno-cast-align -Wno-self-assign -Wno-tautological-compare  
-fomit-frame-pointer  -Wbad-function-cast  -MT
priv/libvex_x86_linux_a-guest_x86_toIR.o -MD -MP -MF
priv/.deps/libvex_x86_linux_a-guest_x86_toIR.Tpo -c -o
priv/libvex_x86_linux_a-guest_x86_toIR.o `test -f 'priv/guest_x86_toIR.c' ||
echo './'`priv/guest_x86_toIR.c && make -C ..) |& tee xxx.log

That said, clang -mllvm -opt-disable=slp-vectorizer works this problem around.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to