Implement identity combines for operations like the following:
%a = G_SUB %b, 0
This can just be replaced with %b.
Over CTMark, this gives some minor size improvements at -O3.
Paths
| Differential D76640
[GlobalISel] Combine (x op 0) -> x for operations with a right identity of 0 ClosedPublic Authored by paquette on Mar 23 2020, 1:39 PM.
Details Summary Implement identity combines for operations like the following: %a = G_SUB %b, 0 This can just be replaced with %b. Over CTMark, this gives some minor size improvements at -O3.
Diff Detail Event TimelineHerald added subscribers: volkan, hiraditya, rovka, wdng. · View Herald TranscriptMar 23 2020, 1:39 PM paquette added a parent revision: D76523: [GlobalISel] Combine G_SELECTs of the form (cond ? x : x) into x.Mar 23 2020, 1:39 PM
paquette added inline comments. paquette retitled this revision from [GlobalISel] Combine (x - 0) -> x to [GlobalISel] Combine (x op 0) -> x for operations with a right identity of 0. Comment Actions
This revision now requires changes to proceed.Mar 24 2020, 12:39 PM Comment Actions 71% of 92 twitter users (65.32 humans) agree that MOP is clearly better than MO, I'm going to stand by my principles here MOP is
Comment Actions
I am more objecting to the capitalization for something that is not an acronym. MO>MOp>>MOP This revision is now accepted and ready to land.Mar 30 2020, 1:49 PM Comment Actions LGTM too. One day I'm going to change all MOPs to MOp when you're not looking anyway. Closed by commit rG63d70ea6a071: [GlobalISel] Combine (x op 0) -> x for operations with a right identity of 0 (authored by paquette). · Explain WhyMar 30 2020, 5:30 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 252419 llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
llvm/include/llvm/Target/GlobalISel/Combine.td
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-trivial-arith.mir
|
The people on your twitter poll are insane and MO is the clearly dominant abbreviation