This repository was archived by the owner on Jan 19, 2025. It is now read-only.
forked from NN-complr-tech/llvm
-
Notifications
You must be signed in to change notification settings - Fork 57
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
m-ly4
suggested changes
Apr 24, 2024
llvm/lib/Target/X86/CMakeLists.txt
Outdated
@@ -23,6 +23,7 @@ tablegen(LLVM X86GenFoldTables.inc -gen-x86-fold-tables -asmwriternum=1) | |||
add_public_tablegen_target(X86CommonTableGen) | |||
|
|||
set(sources | |||
X86VolodinEMulAddPass.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rewrite it as shared lib plugin.
Comment on lines
41
to
44
if (result == end(MIvector)) | ||
return false; | ||
else | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
if (result == end(MIvector)) | |
return false; | |
else | |
return true; | |
return (result != end(MIvector)); |
|
||
for (MachineBasicBlock &MBB : MF) { | ||
for (auto iterator = MBB.begin(); iterator != MBB.end(); ++iterator) { | ||
if (iterator->getOpcode() == X86::MULPDrr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
if (iterator->getOpcode() == X86::MULPDrr) { | |
if (iterator->getOpcode() != X86::MULPDrr) { | |
continue; | |
} |
llvm/test/lab3/test_muladd.mir
Outdated
# e = a + c; | ||
# return d - e; | ||
# } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add also:
# __m128d another_test(__m128d a, __m128d b, __m128d c, __m128d d) {
# __m128d t = a * b;
# __m128d t2 = c * d;
# t2 = t + t2;
# t = t + c;
# return t * t2;
# }
|
m-ly4
approved these changes
Apr 26, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this lab, a pass was implemented that replaces the argument-dependent mul and add instructions with one - muladd.
The source code:
LLVM MIR code before applying the pass:
LLVM MIR code after applying the pass: