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

[GSoC] add nsw generation in LLVM IR for signed adds #6046

Merged
merged 2 commits into from
May 9, 2017
Merged

[GSoC] add nsw generation in LLVM IR for signed adds #6046

merged 2 commits into from
May 9, 2017

Conversation

coodie
Copy link
Contributor

@coodie coodie commented Apr 18, 2017

This PR adds generation of nsw instruction to Chapel's LLVM IR. This change is supposed to improve loop vectorization as discovered in #5788.

@mppf mppf self-assigned this Apr 24, 2017
@mppf
Copy link
Member

mppf commented Apr 25, 2017

  • Passed full local testing with CHPL_LLVM=llvm
  • Passed full local testing with CHPL_LLVM=llvm and --llvm
  • bring up over email
  • wait for Wednesday, May 3

@@ -1498,7 +1498,7 @@ GenRet codegenAdd(GenRet a, GenRet b)
if(values.a->getType()->isFPOrFPVectorTy()) {
ret.val = info->builder->CreateFAdd(values.a, values.b);
} else {
ret.val = info->builder->CreateAdd(values.a, values.b);
ret.val = info->builder->CreateAdd(values.a, values.b, "", false, values.isSigned);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment near the additional arguments to say that the intent is to use an 'nsw' add for signed integers?

@mppf mppf merged commit 868128a into chapel-lang:master May 9, 2017
@coodie coodie changed the title add nsw generation in LLVM IR for signed adds [GSoC] add nsw generation in LLVM IR for signed adds Aug 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants