Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x86 backend doesn't lower x%255 to multiply #1317

Closed
lattner opened this issue Oct 12, 2006 · 2 comments
Closed

x86 backend doesn't lower x%255 to multiply #1317

lattner opened this issue Oct 12, 2006 · 2 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla code-quality llvm:codegen

Comments

@lattner
Copy link
Collaborator

lattner commented Oct 12, 2006

Bugzilla Link 945
Resolution FIXED
Resolved on Feb 22, 2010 12:49
Version 1.0
OS All

Extended Description

Consider:

int test(int X) {
return X%255;
}

The PPC backend lowers this to mulhw+stuff, the X86 backend should too. It is the major reason we are
slower at Benchmarks/Misc/ReedSolomon.c than GCC.

-Chris

@lattner
Copy link
Collaborator Author

lattner commented Oct 12, 2006

assigned to @lattner

@lattner
Copy link
Collaborator Author

lattner commented Oct 12, 2006

Fixed.  Patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20061009/038537.html

Testcase here: Regression/CodeGen/X86/rem.ll

llc is now faster than GCC on reedsolomon.c.

-Chris

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
kitano-metro pushed a commit to RIKEN-RCCS/llvm-project that referenced this issue Feb 14, 2023
kitano-metro pushed a commit to RIKEN-RCCS/llvm-project that referenced this issue Feb 14, 2023
kitano-metro pushed a commit to RIKEN-RCCS/llvm-project that referenced this issue Feb 14, 2023
kitano-metro pushed a commit to RIKEN-RCCS/llvm-project that referenced this issue Feb 14, 2023
kitano-metro pushed a commit to RIKEN-RCCS/llvm-project that referenced this issue Feb 14, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla code-quality llvm:codegen
Projects
None yet
Development

No branches or pull requests

1 participant