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

dialects: (x86): RI Operations adjustment #2518

Merged
merged 1 commit into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions tests/filecheck/dialects/x86/x86_assembly_emission.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ x86.r.push %0 : (!x86.reg<rax>) -> ()
// CHECK: add rax, 2
%ri_sub = x86.ri.sub %0, 2 : (!x86.reg<rax>) -> !x86.reg<rax>
// CHECK: sub rax, 2
%ri_imul = x86.ri.imul %0, 2 : (!x86.reg<rax>) -> !x86.reg<rax>
// CHECK: imul rax, 2
%ri_and = x86.ri.and %0, 2 : (!x86.reg<rax>) -> !x86.reg<rax>
// CHECK: and rax, 2
%ri_or = x86.ri.or %0, 2 : (!x86.reg<rax>) -> !x86.reg<rax>
Expand Down
2 changes: 0 additions & 2 deletions tests/filecheck/dialects/x86/x86_ops.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ x86.r.push %0 : (!x86.reg<>) -> ()
// CHECK-NEXT: %{{.*}} = x86.ri.add %{{.*}}, 2 : (!x86.reg<>) -> !x86.reg<>
%ri_sub = x86.ri.sub %0, 2 : (!x86.reg<>) -> !x86.reg<>
// CHECK-NEXT: %{{.*}} = x86.ri.sub %{{.*}}, 2 : (!x86.reg<>) -> !x86.reg<>
%ri_imul = x86.ri.imul %0, 2 : (!x86.reg<>) -> !x86.reg<>
// CHECK-NEXT: %{{.*}} = x86.ri.imul %{{.*}}, 2 : (!x86.reg<>) -> !x86.reg<>
%ri_and = x86.ri.and %0, 2 : (!x86.reg<>) -> !x86.reg<>
// CHECK-NEXT: %{{.*}} = x86.ri.and %{{.*}}, 2 : (!x86.reg<>) -> !x86.reg<>
%ri_or = x86.ri.or %0, 2 : (!x86.reg<>) -> !x86.reg<>
Expand Down
2 changes: 0 additions & 2 deletions xdsl/dialects/x86/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
R_PushOp,
RI_AddOp,
RI_AndOp,
RI_ImulOp,
RI_MovOp,
RI_OrOp,
RI_SubOp,
Expand Down Expand Up @@ -57,7 +56,6 @@
RM_MovOp,
RI_AddOp,
RI_SubOp,
RI_ImulOp,
RI_AndOp,
RI_OrOp,
RI_XorOp,
Expand Down
11 changes: 0 additions & 11 deletions xdsl/dialects/x86/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,17 +626,6 @@ class RI_SubOp(R_RI_Operation[GeneralRegisterType]):
name = "x86.ri.sub"


@irdl_op_definition
class RI_ImulOp(R_RI_Operation[GeneralRegisterType]):
"""
Multiplies r1 with the immediate value and stores the result in r1.
x[r1] = x[r1] * immediate
https://www.felixcloutier.com/x86/imul
"""

name = "x86.ri.imul"


@irdl_op_definition
class RI_AndOp(R_RI_Operation[GeneralRegisterType]):
"""
Expand Down
Loading