This is an archive of the discontinued LLVM Phabricator instance.

[CSKY] Optimize IR pattern icmp-select with INCT32/INCF32
ClosedPublic

Authored by benshi001 on Jun 21 2023, 8:33 AM.

Diff Detail

Event Timeline

benshi001 created this revision.Jun 21 2023, 8:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 21 2023, 8:33 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
benshi001 requested review of this revision.Jun 21 2023, 8:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 21 2023, 8:33 AM
zixuan-wu accepted this revision.Jun 29 2023, 11:10 PM

No more further comments. I just go through inct-incf.ll without too much detail. I hope all added Pats are all covered in inct-incf.ll

This revision is now accepted and ready to land.Jun 29 2023, 11:10 PM

No more further comments. I just go through inct-incf.ll without too much detail. I hope all added Pats are all covered in inct-incf.ll

Sure. I will have a double check about your concern.

No more further comments. I just go through inct-incf.ll without too much detail. I hope all added Pats are all covered in inct-incf.ll

Sure. I will have a double check about your concern.

I have checked and I think each newly added Pat is covered.

(select (var0 == var1))
(select (var0 != var1))
(select (unsigned var0 >= var1))
(select (signed var0 >= var1))
(select (unsigned var0 > var1))
(select (signed var0 > var1))
(select (unsigned var0 < var1))
(select (signed var0 < var1))
(select (unsigned var0 <= var1))
(select (signed var0 <= var1))
(select (var == immediate))
(select (var != immediate))
(select (unsigned var >= immediate))
(select (signed var >= immediate))
(select (unsigned var > immediate))
(select (signed var > immediate))
(select (unsigned var < immediate))
(select (signed var < immediate))
(select (unsigned var <= immediate))
(select (signed var <= immediate))
(select (non comparison bool condition)) // a function call return bool

No more further comments. I just go through inct-incf.ll without too much detail. I hope all added Pats are all covered in inct-incf.ll

Sure. I will have a double check about your concern.

I have checked and I think each newly added Pat is covered.

(select (var0 == var1))
(select (var0 != var1))
(select (unsigned var0 >= var1))
(select (signed var0 >= var1))
(select (unsigned var0 > var1))
(select (signed var0 > var1))
(select (unsigned var0 < var1))
(select (signed var0 < var1))
(select (unsigned var0 <= var1))
(select (signed var0 <= var1))
(select (var == immediate))
(select (var != immediate))
(select (unsigned var >= immediate))
(select (signed var >= immediate))
(select (unsigned var > immediate))
(select (signed var > immediate))
(select (unsigned var < immediate))
(select (signed var < immediate))
(select (unsigned var <= immediate))
(select (signed var <= immediate))
(select (non comparison bool condition)) // a function call return bool

LGTM