1219131Srwatson/* { dg-do compile } */ 2219131Srwatson/* { dg-options "-O -mcpu=ultrasparc -mvis" } */ 3219131Srwatsontypedef char vec8 __attribute__((vector_size(4))); 4219131Srwatsontypedef short vec16 __attribute__((vector_size(4))); 5219131Srwatson 6219131Srwatsonextern vec8 foo1_8(void); 7219131Srwatsonextern vec8 foo2_8(void); 8219131Srwatson 9219131Srwatsonvec8 fun8(void) 10219131Srwatson{ 11219131Srwatson return ~foo1_8 () | foo2_8 (); 12219131Srwatson} 13219131Srwatson 14219131Srwatsonextern vec16 foo1_16(void); 15219131Srwatsonextern vec16 foo2_16(void); 16219131Srwatson 17219131Srwatsonvec16 fun16(void) 18219131Srwatson{ 19219131Srwatson return ~foo1_16 () | foo1_16 (); 20219131Srwatson} 21219131Srwatson 22219131Srwatson 23219131Srwatson/* This should be transformed into ~b | a. */ 24219131Srwatsonvec8 fun8b(void) 25219131Srwatson{ 26219131Srwatson return foo1_8 () | ~foo2_8 (); 27219131Srwatson} 28219131Srwatson 29219131Srwatsonvec16 fun16b(void) 30219131Srwatson{ 31219131Srwatson return foo1_16 () | ~foo1_16 (); 32219131Srwatson} 33219131Srwatson 34219131Srwatson/* { dg-final { scan-assembler-times "fornot1s\t%" 4 } } */ 35219131Srwatson