From ad6267596c510660a93889a53319e9f051cab39a Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Fri, 25 Nov 1994 23:57:41 +0000 Subject: [PATCH] Add comment on ffs to say why optimizing it further is a bad idea. From-SVN: r8564 --- gcc/config/i386/i386.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index a4cfff591f5..5dfa166d3be 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -5439,6 +5439,10 @@ "" "operands[2] = gen_reg_rtx (SImode);") +;; Note, you cannot optimize away the branch following the bsfl by assuming +;; that the destination is not modified if the input is 0, since not all +;; x86 implementations do this. + (define_insn "" [(set (match_operand:SI 0 "general_operand" "=&r") (plus:SI (ffs:SI (match_operand:SI 1 "general_operand" "rm")) @@ -5453,7 +5457,6 @@ xops[0] = operands[0]; xops[1] = operands[1]; xops[2] = constm1_rtx; - /* Can there be a way to avoid the jump here? */ output_asm_insn (AS2 (bsf%L0,%1,%0), xops); #ifdef LOCAL_LABEL_PREFIX sprintf (buffer, \"jnz %sLFFSSI%d\", -- 2.30.2