[PATCH] D32293: InstructionSimplify: Simplify a shuffle with a undef mask to undef
Davide Italiano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 20 07:27:23 PDT 2017
davide requested changes to this revision.
davide added inline comments.
This revision now requires changes to proceed.
================
Comment at: lib/Analysis/InstructionSimplify.cpp:4147-4149
+ if (isa<UndefValue>(Mask))
+ return UndefValue::get(RetTy);
+
----------------
microopt: you can move this up to the beginning of the function.
================
Comment at: test/Transforms/InstSimplify/shufflevector.ll:113-119
define <4 x i32> @undef_mask(<4 x i32> %x) {
; CHECK-LABEL: @undef_mask(
; CHECK-NEXT: ret <4 x i32> undef
;
%shuf = shufflevector <4 x i32> %x, <4 x i32> undef, <4 x i32> undef
ret <4 x i32> %shuf
}
----------------
We have a similar case here, maybe it makes sense to handle them together?
Repository:
rL LLVM
https://reviews.llvm.org/D32293
More information about the llvm-commits
mailing list