[PATCH] D74322: GlobalISel: Extend narrowing to G_ASHR
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 10 08:06:56 PST 2020
foad added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1493
+ // (G_ASHR i64:x, 63) ->
+ // G_MERGE_VALUES (G_ASHR hi_32(x), 31), (G_ASHR hi_32(x), 31)
+ Builder.buildMerge(DstReg, { Hi, Hi });
----------------
foad wrote:
> Why not generalize this to:
> ```
> (G_ASHR i64:x, 63) for C >= 32 ->
> G_MERGE_VALUES (G_ASHR hi_32(x), C-32), (G_ASHR hi_32(x), 31)
> ```
> ?
I meant `(G_ASHR i64:x, C)` of course.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74322/new/
https://reviews.llvm.org/D74322
More information about the llvm-commits
mailing list