diff options
author | Michael Meissner <meissner@gcc.gnu.org> | 1994-11-25 23:57:41 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 1994-11-25 23:57:41 +0000 |
commit | ad6267596c510660a93889a53319e9f051cab39a (patch) | |
tree | 3fa75decb776ebf7fa4f433e767120efbc91b2aa /gcc | |
parent | 00f8ff66e9db8007b9dd7cd0c1eee6c5939184d0 (diff) | |
download | gcc-ad6267596c510660a93889a53319e9f051cab39a.zip gcc-ad6267596c510660a93889a53319e9f051cab39a.tar.gz gcc-ad6267596c510660a93889a53319e9f051cab39a.tar.bz2 |
Add comment on ffs to say why optimizing it further is a bad idea.
From-SVN: r8564
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/i386/i386.md | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index a4cfff5..5dfa166 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\", |