[PATCH] D31525: InstSimplify: Add a hook for shufflevector
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 31 06:47:53 PDT 2017
spatel added reviewers: sanjoy, nlopes, majnemer.
spatel added a comment.
Why would a shuffle with undef mask automatically return undef? For example:
shufflevector <2 x i8> <i8 42, i8 42>, <2 x i8> <i8 42, i8 42>, <2 x i32> undef
Should this be constant folded to <i8 42, i8 42> , <2 x i8> undef or something else?
================
Comment at: lib/Analysis/InstructionSimplify.cpp:4114-4115
+
+ auto Op0Const = dyn_cast<Constant>(Op0);
+ auto Op1Const = dyn_cast<Constant>(Op1);
+
----------------
Prefer 'auto *' to make the pointer-ness of the cast explicit.
Repository:
rL LLVM
https://reviews.llvm.org/D31525
More information about the llvm-commits
mailing list