Lines Matching refs:UndefValue
521 if (isa<UndefValue>(V)) { in ConstantFoldCastInstruction()
528 return UndefValue::get(DestTy); in ConstantFoldCastInstruction()
617 return UndefValue::get(DestTy); in ConstantFoldCastInstruction()
750 } else if (isa<UndefValue>(Cond)) { in ConstantFoldSelectInstruction()
751 V = isa<UndefValue>(V1Element) ? V1Element : V2Element; in ConstantFoldSelectInstruction()
764 if (isa<UndefValue>(Cond)) { in ConstantFoldSelectInstruction()
765 if (isa<UndefValue>(V1)) return V1; in ConstantFoldSelectInstruction()
768 if (isa<UndefValue>(V1)) return V2; in ConstantFoldSelectInstruction()
769 if (isa<UndefValue>(V2)) return V1; in ConstantFoldSelectInstruction()
788 if (isa<UndefValue>(Val)) // ee(undef, x) -> undef in ConstantFoldExtractElementInstruction()
789 return UndefValue::get(Val->getType()->getVectorElementType()); in ConstantFoldExtractElementInstruction()
793 if (isa<UndefValue>(Idx)) in ConstantFoldExtractElementInstruction()
794 return UndefValue::get(Val->getType()->getVectorElementType()); in ConstantFoldExtractElementInstruction()
799 return UndefValue::get(Val->getType()->getVectorElementType()); in ConstantFoldExtractElementInstruction()
808 if (isa<UndefValue>(Idx)) in ConstantFoldInsertElementInstruction()
809 return UndefValue::get(Val->getType()); in ConstantFoldInsertElementInstruction()
816 return UndefValue::get(Val->getType()); in ConstantFoldInsertElementInstruction()
842 if (isa<UndefValue>(Mask)) in ConstantFoldShuffleVectorInstruction()
843 return UndefValue::get(VectorType::get(EltTy, MaskNumElts)); in ConstantFoldShuffleVectorInstruction()
855 Result.push_back(UndefValue::get(EltTy)); in ConstantFoldShuffleVectorInstruction()
860 InElt = UndefValue::get(EltTy); in ConstantFoldShuffleVectorInstruction()
925 (isa<UndefValue>(C1) || isa<UndefValue>(C2)); in ConstantFoldBinaryInstruction()
929 if (isa<UndefValue>(C1) && isa<UndefValue>(C2)) in ConstantFoldBinaryInstruction()
936 return UndefValue::get(C1->getType()); in ConstantFoldBinaryInstruction()
938 if (isa<UndefValue>(C1) && isa<UndefValue>(C2)) // undef & undef -> undef in ConstantFoldBinaryInstruction()
943 if (isa<UndefValue>(C1) && isa<UndefValue>(C2)) in ConstantFoldBinaryInstruction()
949 return UndefValue::get(C1->getType()); in ConstantFoldBinaryInstruction()
957 if (isa<UndefValue>(C2)) in ConstantFoldBinaryInstruction()
976 if (isa<UndefValue>(C1) && isa<UndefValue>(C2)) // undef | undef -> undef in ConstantFoldBinaryInstruction()
981 if (isa<UndefValue>(C2)) in ConstantFoldBinaryInstruction()
990 if (isa<UndefValue>(C2)) in ConstantFoldBinaryInstruction()
1000 if (isa<UndefValue>(C2)) in ConstantFoldBinaryInstruction()
1013 if (isa<UndefValue>(C1) && isa<UndefValue>(C2)) in ConstantFoldBinaryInstruction()
1050 return UndefValue::get(CI2->getType()); // X / 0 == undef in ConstantFoldBinaryInstruction()
1057 return UndefValue::get(CI2->getType()); // X % 0 == undef in ConstantFoldBinaryInstruction()
1151 return UndefValue::get(CI1->getType()); // MIN_INT / -1 -> undef in ConstantFoldBinaryInstruction()
1159 return UndefValue::get(CI1->getType()); // MIN_INT % -1 -> undef in ConstantFoldBinaryInstruction()
1170 return UndefValue::get(C1->getType()); // too big shift is undef in ConstantFoldBinaryInstruction()
1174 return UndefValue::get(C1->getType()); // too big shift is undef in ConstantFoldBinaryInstruction()
1178 return UndefValue::get(C1->getType()); // too big shift is undef in ConstantFoldBinaryInstruction()
1231 return UndefValue::get(VTy); in ConstantFoldBinaryInstruction()
1714 if (isa<UndefValue>(C1) || isa<UndefValue>(C2)) { in ConstantFoldCompareInstruction()
1721 return UndefValue::get(ResultTy); in ConstantFoldCompareInstruction()
2077 if (isa<UndefValue>(C)) in ConstantFoldGetElementPtr()
2078 return UndefValue::get(GEPTy); in ConstantFoldGetElementPtr()
2081 if (Idxs.size() == 1 && (Idx0->isNullValue() || isa<UndefValue>(Idx0))) in ConstantFoldGetElementPtr()
2090 if (!isa<UndefValue>(Idxs[i]) && in ConstantFoldGetElementPtr()