This is an archive of the discontinued LLVM Phabricator instance.

[InstSimplify] Test for D149001
AbandonedPublic

Authored by floatshadow on Apr 22 2023, 9:13 PM.

Details

Reviewers
None
Summary

[u]sdiv X (1 [u]srem Y) --> X, [u]srem X (1 [u]srem Y) --> 0

https://reviews.llvm.org/D149001

Diff Detail

Event Timeline

floatshadow created this revision.Apr 22 2023, 9:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2023, 9:13 PM
floatshadow requested review of this revision.Apr 22 2023, 9:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2023, 9:13 PM

This doesn't look right. I don't know how other people do this, but below is my regular workflow:

# Let's say you have a commit A and you need to split a part of it to B, which is a commit before A
git reset HEAD^ # This unstaged all your changes to A
git add -p . # add changes you want to split
git commit # This is the commit B
git add -p . # add the rest of your changes
git commit # This is the commit A
# Now do git log you can see you have B --> A 
git reset --hard HEAD^ # jump to commit B because arc only uploads the top one commit
arc diff # Create revision B, then add a child revision, which is your old revision of your folds
git reset --hard xxxx # jump back to A, you can use git reflog to find the commit hash
arc diff --update xxx # update your old revision

This doesn't look right. I don't know how other people do this, but below is my regular workflow:

# Let's say you have a commit A and you need to split a part of it to B, which is a commit before A
git reset HEAD^ # This unstaged all your changes to A
git add -p . # add changes you want to split
git commit # This is the commit B
git add -p . # add the rest of your changes
git commit # This is the commit A
# Now do git log you can see you have B --> A 
git reset --hard HEAD^ # jump to commit B because arc only uploads the top one commit
arc diff # Create revision B, then add a child revision, which is your old revision of your folds
git reset --hard xxxx # jump back to A, you can use git reflog to find the commit hash
arc diff --update xxx # update your old revision

Thank you for your reply. I am not familiar with parent/child chain. I will try a fix later.