[PATCH] D18944: [DAGCombiner] Fold xor/and/or (bitcast(A), bitcast(B)) -> bitcast(op (A, B)) anytime before LegalizeVectorOprs
Elena Demikhovsky via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 10 10:31:51 PDT 2016
delena added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2776
@@ -2775,3 +2775,3 @@
N0.getOpcode() == ISD::SCALAR_TO_VECTOR) &&
- Level == AfterLegalizeTypes) {
+ Level <= AfterLegalizeTypes) {
SDValue In0 = N0.getOperand(0);
----------------
I'm not sure that it is safe for illegal types. You don't cover this in the tests.
If you want to do the transformation before type promotion, you, probably, should check that the types are legal.
================
Comment at: test/CodeGen/X86/avx512-mask-op.ll:95
@@ -94,3 +94,3 @@
}
define i8 @shuf_test1(i16 %v) nounwind {
----------------
What code will be generated on the original test?
I'd prefer do not change the existing tests.
Repository:
rL LLVM
http://reviews.llvm.org/D18944
More information about the llvm-commits
mailing list