-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[X86][NFC] - Remove fild/fist c++ predicates from patfrag #142562
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
Conversation
@llvm/pr-subscribers-backend-x86 Author: Pawan Nirpal (pawan-nirpal-031) ChangesFull diff: https://github.com/llvm/llvm-project/pull/142562.diff 1 Files Affected:
diff --git a/llvm/lib/Target/X86/X86InstrFragments.td b/llvm/lib/Target/X86/X86InstrFragments.td
index 712492e474619..116986a0fffea 100644
--- a/llvm/lib/Target/X86/X86InstrFragments.td
+++ b/llvm/lib/Target/X86/X86InstrFragments.td
@@ -842,23 +842,17 @@ def X86fldf80 : PatFrag<(ops node:$ptr), (X86fld node:$ptr), [{
return cast<MemIntrinsicSDNode>(N)->getMemoryVT() == MVT::f80;
}]>;
-def X86fild16 : PatFrag<(ops node:$ptr), (X86fild node:$ptr), [{
- return cast<MemIntrinsicSDNode>(N)->getMemoryVT() == MVT::i16;
-}]> {
+def X86fild16 : PatFrag<(ops node:$ptr), (X86fild node:$ptr)> {
let IsLoad = true;
let MemoryVT = i16;
}
-def X86fild32 : PatFrag<(ops node:$ptr), (X86fild node:$ptr), [{
- return cast<MemIntrinsicSDNode>(N)->getMemoryVT() == MVT::i32;
-}]> {
+def X86fild32 : PatFrag<(ops node:$ptr), (X86fild node:$ptr)> {
let IsLoad = true;
let MemoryVT = i32;
}
-def X86fild64 : PatFrag<(ops node:$ptr), (X86fild node:$ptr), [{
- return cast<MemIntrinsicSDNode>(N)->getMemoryVT() == MVT::i64;
-}]> {
+def X86fild64 : PatFrag<(ops node:$ptr), (X86fild node:$ptr)> {
let IsLoad = true;
let MemoryVT = i64;
}
@@ -873,26 +867,20 @@ def X86fist64 : PatFrag<(ops node:$val, node:$ptr),
return cast<MemIntrinsicSDNode>(N)->getMemoryVT() == MVT::i64;
}]>;
-def X86fp_to_i16mem : PatFrag<(ops node:$val, node:$ptr),
- (X86fp_to_mem node:$val, node:$ptr), [{
- return cast<MemIntrinsicSDNode>(N)->getMemoryVT() == MVT::i16;
-}]> {
+def X86fp_to_i16mem
+ : PatFrag<(ops node:$val, node:$ptr), (X86fp_to_mem node:$val, node:$ptr)> {
let IsStore = true;
let MemoryVT = i16;
}
-def X86fp_to_i32mem : PatFrag<(ops node:$val, node:$ptr),
- (X86fp_to_mem node:$val, node:$ptr), [{
- return cast<MemIntrinsicSDNode>(N)->getMemoryVT() == MVT::i32;
-}]> {
+def X86fp_to_i32mem
+ : PatFrag<(ops node:$val, node:$ptr), (X86fp_to_mem node:$val, node:$ptr)> {
let IsStore = true;
let MemoryVT = i32;
}
-def X86fp_to_i64mem : PatFrag<(ops node:$val, node:$ptr),
- (X86fp_to_mem node:$val, node:$ptr), [{
- return cast<MemIntrinsicSDNode>(N)->getMemoryVT() == MVT::i64;
-}]> {
+def X86fp_to_i64mem
+ : PatFrag<(ops node:$val, node:$ptr), (X86fp_to_mem node:$val, node:$ptr)> {
let IsStore = true;
let MemoryVT = i64;
}
|
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 - cheers
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. Thanks!
Drop the c++ predicates and use MemoryVT for memory size check for FILD and FIST.
Drop the c++ predicates and use MemoryVT for memory size check for FILD and FIST.
Drop the c++ predicates and use MemoryVT for memory size check for FILD and FIST.