https://godbolt.org/z/h8ejrG4hb
rdar://83597585
Paths
| Differential D111856
[AArch64][GlobalISel] combine (and (or x, c1), c2) => (and x, c2) iff c1 & c2 == 0 ClosedPublic Authored by jroelofs on Oct 14 2021, 5:05 PM.
Details
Diff Detail
Event TimelineHerald added subscribers: hiraditya, kristof.beyls, rovka. · View Herald TranscriptOct 14 2021, 5:05 PM This revision is now accepted and ready to land.Oct 20 2021, 10:55 AM Closed by commit rGb046eb19b8a4: [AArch64][GlobalISel] combine (and (or x, c1), c2) => (and x, c2) iff c1 & c2… (authored by jroelofs). · Explain WhyOct 20 2021, 12:12 PM This revision was automatically updated to reflect the committed changes. Comment Actions This is another case that would ideally be handled with demanded bits analysis. We would visit (or x, c1), see that none of the bits set in c1 are demanded, and simplify to x.
Revision Contents
Diff 381052 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/combine-and-or-disjoint-mask.mir
|
Could you just replace the operands of the existing G_AND rather than building a new G_AND?