Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | ||
---|---|---|
3680–3683 | What about G_BUILD_VECTOR_TRUNC? This also probably should check for legality / before legalize. The DAG version also has this hasOneUseCheck: (VecOp.hasOneUse() || TLI.aggressivelyPreferBuildVectorSources(VecVT))) { | |
llvm/test/CodeGen/AArch64/GlobalISel/combine-extract-vec-elt.mir | ||
26 | Should also have an out of bounds case |
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | ||
---|---|---|
3680–3683 |
We'd have to insert a scalar truncate, which the dagcombine doesn't seem to do. I can try it though. |
New patch.
With the oneuse check in place, it now doesn't handle one of the cases I was interested in, where we see one extract for each element of the BV. I'll create a new patch to combine that away, probably starting from a build_vector.
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | ||
---|---|---|
3678 | I would guess this is faster than getConstantVRegValWithLookThrough? Maybe check this first? | |
3686 | I guess this is slightly more concise | |
3692 | Can you use the getTargetLowering() helper function here? | |
3695 | Would it be better to make a LLT variant of this function? | |
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp | ||
645 | Why no test for this? |
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | ||
---|---|---|
3695 | I'm not sure that's the right idea. Having 2 sets of hooks for everything sounds like a road we want to avoid as much as possible. | |
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp | ||
645 | Because it doesn't actually do anything. There's no lowering functionality implemented, but in order to test the combine we need something here that makes it seem like we have legalization support. So far I haven't seen this TRUNC variant generated in real code. |
Fix AMDGPU test crashes due to not specifying enough types to legality query. I had to undo some of the changes in the last patch to do this.
I would guess this is faster than getConstantVRegValWithLookThrough? Maybe check this first?