-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[LICM] Fix dropped metadata #95221
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
[LICM] Fix dropped metadata #95221
Conversation
@llvm/pr-subscribers-llvm-transforms Author: Tim Gymnich (tgymnich) ChangesFixes #91919 LICM drops metadata for call instructions when cloning instructions. Full diff: https://github.com/llvm/llvm-project/pull/95221.diff 1 Files Affected:
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index 5eccf7b4adb65..75883e0da214d 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -1453,6 +1453,7 @@ static Instruction *cloneInstructionInExitBlock(
}
New = CallInst::Create(CI, OpBundles);
+ New->copyMetadata(*CI);
} else {
New = I.clone();
}
|
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 a test case in llvm/test/Transforms/LICM.
7ed902e
to
771f1c1
Compare
38edf12
to
e4dfffb
Compare
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.
LGTM
deleted the branch too early. Only saw the approval |
e4dfffb
to
eb108f0
Compare
eb108f0
to
ebe76dd
Compare
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/268 Here is the relevant piece of the build log for the reference:
|
LICM drops metadata for call instructions when cloning instructions. This patch just adds the missing `copyMetadata`. Fixes llvm#91919.
Fixes #91919
LICM drops metadata for call instructions when cloning instructions.
This patch just adds the missing
copyMetadata
.