Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline

elhewaty (Mohamed Atef)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 2 2023, 2:39 PM (13 w, 2 d)

Recent Activity

Sep 14 2023

elhewaty added a comment to D159464: [InstCombine] Fold comparison of adding two zero extended booleans.

Can any one review this patch

Sep 14 2023, 9:54 AM · Restricted Project, Restricted Project

Sep 8 2023

elhewaty updated the diff for D159464: [InstCombine] Fold comparison of adding two zero extended booleans.
Sep 8 2023, 9:19 AM · Restricted Project, Restricted Project
elhewaty added a comment to D159464: [InstCombine] Fold comparison of adding two zero extended booleans.

// zext i1 X + zext i1 Y != 0 --> or i1 X, Y
https://alive2.llvm.org/ce/z/Rg3mm7

Sep 8 2023, 4:03 AM · Restricted Project, Restricted Project
elhewaty updated the diff for D159464: [InstCombine] Fold comparison of adding two zero extended booleans.
Sep 8 2023, 4:03 AM · Restricted Project, Restricted Project

Sep 7 2023

elhewaty updated the diff for D159464: [InstCombine] Fold comparison of adding two zero extended booleans.
Sep 7 2023, 4:35 PM · Restricted Project, Restricted Project
elhewaty added a comment to D159464: [InstCombine] Fold comparison of adding two zero extended booleans.

// zext i1 X + zext i1 Y == 0 --> !(or i1 X, Y):
https://alive2.llvm.org/ce/z/Wfs9BS

Sep 7 2023, 11:53 AM · Restricted Project, Restricted Project
elhewaty updated the diff for D159464: [InstCombine] Fold comparison of adding two zero extended booleans.
Sep 7 2023, 3:02 AM · Restricted Project, Restricted Project
elhewaty added a comment to D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.

Ok, I will.

Sep 7 2023, 2:49 AM · Restricted Project, Restricted Project
elhewaty added a comment to D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.

Yes, But I am working on the InstCombine patch as you know.
I don't mind working on as many patches as possible. I want to understand LLVM internals.
But I have some personal problems these days, but I can still work. If you don't mind I can work on
bugs at my own pace assign me to a bug and I will work on it.

Sep 7 2023, 2:10 AM · Restricted Project, Restricted Project

Sep 6 2023

elhewaty added a comment to D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.

Mohamed Atef <mohamedatef1698@gmail.com >

Sep 6 2023, 11:13 AM · Restricted Project, Restricted Project
elhewaty updated the diff for D159464: [InstCombine] Fold comparison of adding two zero extended booleans.
Sep 6 2023, 8:12 AM · Restricted Project, Restricted Project
elhewaty retitled D159464: [InstCombine] Fold comparison of adding two zero extended booleans from [InstCombine] Fold comparison of add of zero extended booleans to [InstCombine] Fold comparison of adding two zero extended booleans.
Sep 6 2023, 7:22 AM · Restricted Project, Restricted Project
elhewaty retitled D159464: [InstCombine] Fold comparison of adding two zero extended booleans from Fold comparison of add of zero extended booleans to [InstCombine] Fold comparison of add of zero extended booleans.
Sep 6 2023, 7:14 AM · Restricted Project, Restricted Project
elhewaty added a reviewer for D159464: [InstCombine] Fold comparison of adding two zero extended booleans: arsenm.
Sep 6 2023, 6:31 AM · Restricted Project, Restricted Project
elhewaty requested review of D159464: [InstCombine] Fold comparison of adding two zero extended booleans.
Sep 6 2023, 6:28 AM · Restricted Project, Restricted Project
elhewaty updated the diff for D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.
Sep 6 2023, 3:30 AM · Restricted Project, Restricted Project

Sep 5 2023

elhewaty added a comment to D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.

In fact, I found these tests in with_overflow.ll the first test. and I added it but I don't know why the code failed. even after rebasing the tests fail. and the tests pass if I remove the conditions.

Sep 5 2023, 4:24 PM · Restricted Project, Restricted Project
elhewaty updated the diff for D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.
Sep 5 2023, 4:23 PM · Restricted Project, Restricted Project
elhewaty added a comment to D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.

@RKSimon Hi I don't fully understand the testing infrastructure. I think I need some help.
for the following test:

Sep 5 2023, 8:35 AM · Restricted Project, Restricted Project

Sep 4 2023

elhewaty added a comment to D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.

As I am a complete beginner with LLVM how can write tests? Is there any tutorial or example?

In this case the best reference tests are probably in combine-mulo.ll and xmulo.ll in the llvm-project/llvm/test/CodeGen/X86/ folder

I think you're only missing test coverage for the computeOverflowForSignedMul "SignBits == BitWidth + 1" knownbits cases.

What about the test coverage for the rest of the functions?

You could investigate how InstCombine handles these cases - look inside llvm-project\llvm\test\Transforms\InstCombine for smul.overflow tests - you could try disabling the "SignBits == BitWidth + 1" handling in ValueTracking.cpp and then see which tests change/fail with ninja check-llvm-transforms-instcombine - you might then be able to convert some of those to combine-mulo.ll / xmulo.ll

I think I will try this now

Sep 4 2023, 8:22 AM · Restricted Project, Restricted Project
elhewaty updated the diff for D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.
Sep 4 2023, 8:12 AM · Restricted Project, Restricted Project
elhewaty updated the diff for D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.
Sep 4 2023, 4:58 AM · Restricted Project, Restricted Project
elhewaty added a comment to D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.

As I am a complete beginner with LLVM how can write tests? Is there any tutorial or example?

Sep 4 2023, 4:33 AM · Restricted Project, Restricted Project
elhewaty added a comment to D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.

I will update the patch and upload it now

Sep 4 2023, 4:24 AM · Restricted Project, Restricted Project
elhewaty updated the diff for D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.
Sep 4 2023, 1:35 AM · Restricted Project, Restricted Project
elhewaty added a comment to D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.

I already did this.

Sep 4 2023, 1:12 AM · Restricted Project, Restricted Project

Sep 3 2023

elhewaty added a comment to D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.

@RKSimon I noticed that people add tests before code changes, why?
Can you help me with the tests? I really worked hard to understand how to write one, but no results.

Sep 3 2023, 8:17 PM · Restricted Project, Restricted Project
elhewaty added a comment to D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.

I used git blame on SelectionDAG.cpp and DAGCombiner.cpp and found that tests are in llvm/test/CodeGen/X86/xaluo.ll does this mean that I should modify xaluo.ll and xmulo.ll? am I even on the right track?
Why after the modification and before adding tests make check-llvm-codegen fails in or-with-overflow.ll and vec_smulo.ll
I discovered I should modify xmulo.ll, vec_smulo.ll and xaluo.ll.

Sep 3 2023, 12:41 PM · Restricted Project, Restricted Project
elhewaty added a comment to D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.
Sep 3 2023, 9:38 AM · Restricted Project, Restricted Project
elhewaty added a comment to D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.
Sep 3 2023, 5:41 AM · Restricted Project, Restricted Project

Sep 2 2023

elhewaty requested review of D159406: [SelectionDAG] Add computeOverflowForSignedMul / computeOverflowForUnsignedMul overflow handlers.
Sep 2 2023, 3:00 PM · Restricted Project, Restricted Project