Skip to content
Snippets Groups Projects
  • Maciej W. Rozycki's avatar
    0f4ce86e
    RISC-V/testsuite: Add branchless cases for generic FP cond adds · 0f4ce86e
    Maciej W. Rozycki authored
    Verify, for generic floating-point conditional-add operations that have
    a corresponding conditional-set machine instruction, that if-conversion
    triggers via `noce_try_addcc' at `-mbranch-cost=3' setting, which makes
    branchless code sequences emitted by if-conversion cheaper than their
    original branched equivalents, and that extraneous instructions such as
    SNEZ, etc. are not present in output.
    
    The reason to XFAIL SImode tests for RV64 targets is the compiler thinks
    it has to sign-extend addends, which causes if-conversion to give up.
    
    	gcc/testsuite/
    	* gcc.target/riscv/adddifeq.c: New test.
    	* gcc.target/riscv/adddifge.c: New test.
    	* gcc.target/riscv/adddifgt.c: New test.
    	* gcc.target/riscv/adddifle.c: New test.
    	* gcc.target/riscv/adddiflt.c: New test.
    	* gcc.target/riscv/addsifeq.c: New test.
    	* gcc.target/riscv/addsifge.c: New test.
    	* gcc.target/riscv/addsifgt.c: New test.
    	* gcc.target/riscv/addsifle.c: New test.
    	* gcc.target/riscv/addsiflt.c: New test.
    0f4ce86e
    History
    RISC-V/testsuite: Add branchless cases for generic FP cond adds
    Maciej W. Rozycki authored
    Verify, for generic floating-point conditional-add operations that have
    a corresponding conditional-set machine instruction, that if-conversion
    triggers via `noce_try_addcc' at `-mbranch-cost=3' setting, which makes
    branchless code sequences emitted by if-conversion cheaper than their
    original branched equivalents, and that extraneous instructions such as
    SNEZ, etc. are not present in output.
    
    The reason to XFAIL SImode tests for RV64 targets is the compiler thinks
    it has to sign-extend addends, which causes if-conversion to give up.
    
    	gcc/testsuite/
    	* gcc.target/riscv/adddifeq.c: New test.
    	* gcc.target/riscv/adddifge.c: New test.
    	* gcc.target/riscv/adddifgt.c: New test.
    	* gcc.target/riscv/adddifle.c: New test.
    	* gcc.target/riscv/adddiflt.c: New test.
    	* gcc.target/riscv/addsifeq.c: New test.
    	* gcc.target/riscv/addsifge.c: New test.
    	* gcc.target/riscv/addsifgt.c: New test.
    	* gcc.target/riscv/addsifle.c: New test.
    	* gcc.target/riscv/addsiflt.c: New test.