-
Notifications
You must be signed in to change notification settings - Fork 796
[SYCL-MLIR] Improve CodeGen for Add and Sub expressions #7421
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
victor-eds
left a comment
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.
NOTE: We cannot generate NUW, NSW, exact or inbounds op flags. Not supported in MLIR yet.
|
First of two PRs addressing binary arithmetic operations. |
df208f3 to
79562cc
Compare
Enable addition/subtraction of floating point vectors. Make integer and pointer addition commutative. Instead of generating an incorrect `getelementptr` instruction with a `null` pointer argument, generate an `inttoptr` using the index as an argument. Use polygeist.subindex instead of polygeist.memref2pointer+llvm.getelementptr+polygeist.pointer2memref when subtracting an index to a pointer. Cast pointers to void and functions to i8 before operating. Signed-off-by: Victor Perez <[email protected]>
65f2fa2 to
b0b8e45
Compare
etiotto
left a comment
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 - Added some comments on the lit tests and other minor comments.
Enable addition/subtraction of floating point vectors. Make integer and pointer addition commutative. Instead of generating an incorrect `getelementptr` instruction with a `null` pointer argument, generate an `inttoptr` using the index as an argument. Use polygeist.subindex instead of polygeist.memref2pointer+llvm.getelementptr+polygeist.pointer2memref when subtracting an index to a pointer. Cast pointers to void and functions to i8 before operating. Signed-off-by: Victor Perez <[email protected]>
Enable addition/subtraction of floating point vectors.
Make integer and pointer addition commutative.
Instead of generating an incorrect
getelementptrinstruction with anullpointer argument, generate aninttoptrusing the index as an argument.Use polygeist.subindex instead of
polygeist.memref2pointer+llvm.getelementptr+polygeist.pointer2memref when subtracting an index to a pointer.
Cast pointers to void and functions to i8 before operating.
Signed-off-by: Victor Perez [email protected]