[PATCH] [X86, AVX] instcombine vperm2 intrinsics with zero inputs into shuffles
Andrea Di Biagio
Andrea_DiBiagio at sn.scee.net
Tue Mar 24 10:19:19 PDT 2015
LGTM. Thanks Sanjay!
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:222-230
@@ +221,11 @@
+
+ // The high bit of the selection field chooses from either the first
+ // operand or the second operand.
+ bool LowInputSelect = Imm & 0x02;
+ bool HighInputSelect = Imm & 0x20;
+
+ // The low bit of the selection field chooses from either the low or
+ // high half of the selected operand.
+ bool LowHalfSelect = Imm & 0x01;
+ bool HighHalfSelect = Imm & 0x10;
+
----------------
You can move this logic after line 235.
http://reviews.llvm.org/D8567
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list