It's possible to end up with a zext or something in the way of a G_CONSTANT, even pre-legalization. This can happen with memsets.
e.g.
To make sure we can catch these cases, use getConstantVRegValWithLookThrough instead of mi_match.
Paths
| Differential D81875
[GlobalISel] Look through extends etc in CombinerHelper::matchConstantOp ClosedPublic Authored by paquette on Jun 15 2020, 1:28 PM.
Details Summary It's possible to end up with a zext or something in the way of a G_CONSTANT, even pre-legalization. This can happen with memsets. e.g. To make sure we can catch these cases, use getConstantVRegValWithLookThrough instead of mi_match.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Jun 15 2020, 3:02 PM Closed by commit rG5a4c3f6b06f6: [GlobalISel] Look through extends etc in CombinerHelper::matchConstantOp (authored by paquette). · Explain WhyJun 15 2020, 4:37 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 270910 llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-trivial-arith.mir
|