[PATCH] fix for PR20354 - Miscompile of fabs due to vectorization

Renato Golin renato.golin at linaro.org
Mon Jul 28 09:28:33 PDT 2014


================
Comment at: test/CodeGen/ARM/2009-10-21-InvalidFNeg.ll:14
@@ -12,1 +13,3 @@
 
+; As part of the optimization from PR20354, this test should no longer use any VFP/NEON. 
+; CHECK-LABEL: foo
----------------
I'm not sure what was the purpose of this test, but you can't just assume that it's ok. Can you share the resulting code?

Currently, it produces this:

    add	r1, sp, #36
    add	r0, r0, #48
    vld1.32	{d16[0]}, [r1:32]
    add	r1, r1, #4
    vld1.32	{d16[1]}, [r1:32]
    add	r1, sp, #44
    vld1.32	{d17[0]}, [r1:32]
    add	r1, r1, #4
    vld1.32	{d17[1]}, [r1:32]
    vneg.f32	q8, q8
    vst1.64	{d16, d17}, [r0:128]
    bx	lr

Which I agree, doesn't look like a clear winner, but it might be a side effect of the original intention...

http://reviews.llvm.org/D4633






More information about the llvm-commits mailing list