[PATCH] D88995: Support vectors in CastInst::isBitOrNoopPointerCastable
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 7 23:29:39 PDT 2020
lebedev.ri added a comment.
Let me try to approach this slightly differently..
In the most original unoptimized IR, were there actually two different loads, one of a pointer and one of an integer?
If not, then the fact that we ended up with two loads is the problem that needs solving.
Does D88979 <https://reviews.llvm.org/D88979> help?
If not, would it please be possible to see some kind of an end-to-end test showing how that still happens?
================
Comment at: llvm/test/Transforms/InstCombine/load.ll:389
+; CHECK-NEXT: [[X:%.*]] = load <2 x i64>, <2 x i64>* [[P:%.*]], align 16
+; CHECK-NEXT: [[Y_CAST:%.*]] = inttoptr <2 x i64> [[X]] to <2 x i8*>
+; CHECK-NEXT: call void @use.v2.p0(<2 x i8*> [[Y_CAST]])
----------------
reames wrote:
> lebedev.ri wrote:
> > This is going in the opposite direction than what we've just recently disscussed/estabilished - we can't/shouldn't introduce int<->ptr casts that weren't in the source code.
> You need to give a lot more context here. This is simple load forwarding - as done by e.g. GVN. If you want to change direction, I think that should be separated from this patch.
Right. It's D88860 for documentation change, and D88842 / D88789 / D88788 for some lengthy discussions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88995/new/
https://reviews.llvm.org/D88995
More information about the llvm-commits
mailing list