[PATCH] D16252: AMDGPU: Reduce 64-bit lshr by constant to 32-bit
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 18 12:29:59 PST 2016
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUISelLowering.cpp:2567-2569
@@ +2566,5 @@
+
+ SDValue Vec = DAG.getNode(ISD::BUILD_VECTOR, SL, MVT::v2i32, Zero, Lo);
+ return DAG.getNode(ISD::BITCAST, SL, MVT::i64, Vec);
+}
+
----------------
tstellarAMD wrote:
> Was this change meant for another commit?
Yes. Apparently you aren't supposed to use BUILD_PAIR/EXTRACT_ELEMENT after legalization, although we do it anyway and it happens to work. We currently have a mix of bitcast + build_vector and build_pair. I'm not sure we really want either though. BUILD_PAIR isn't supposed to work, and the vector operations confuse other basic optimizations. computeKnownBits doesn't look through vector extracts for example, although it could be special cased for extract from a build_vector with a constant index.
http://reviews.llvm.org/D16252
More information about the llvm-commits
mailing list