@@ -155,7 +155,7 @@ std::optional<Instruction *>
155
155
InstCombiner::targetInstCombineIntrinsic (IntrinsicInst &II) {
156
156
// Handle target specific intrinsics
157
157
if (II.getCalledFunction ()->isTargetIntrinsic ()) {
158
- return TTI .instCombineIntrinsic (*this , II);
158
+ return TTIForTargetIntrinsicsOnly .instCombineIntrinsic (*this , II);
159
159
}
160
160
return std::nullopt;
161
161
}
@@ -165,8 +165,8 @@ std::optional<Value *> InstCombiner::targetSimplifyDemandedUseBitsIntrinsic(
165
165
bool &KnownBitsComputed) {
166
166
// Handle target specific intrinsics
167
167
if (II.getCalledFunction ()->isTargetIntrinsic ()) {
168
- return TTI .simplifyDemandedUseBitsIntrinsic (* this , II, DemandedMask, Known,
169
- KnownBitsComputed);
168
+ return TTIForTargetIntrinsicsOnly .simplifyDemandedUseBitsIntrinsic (
169
+ * this , II, DemandedMask, Known, KnownBitsComputed);
170
170
}
171
171
return std::nullopt;
172
172
}
@@ -178,15 +178,18 @@ std::optional<Value *> InstCombiner::targetSimplifyDemandedVectorEltsIntrinsic(
178
178
SimplifyAndSetOp) {
179
179
// Handle target specific intrinsics
180
180
if (II.getCalledFunction ()->isTargetIntrinsic ()) {
181
- return TTI .simplifyDemandedVectorEltsIntrinsic (
181
+ return TTIForTargetIntrinsicsOnly .simplifyDemandedVectorEltsIntrinsic (
182
182
*this , II, DemandedElts, PoisonElts, PoisonElts2, PoisonElts3,
183
183
SimplifyAndSetOp);
184
184
}
185
185
return std::nullopt;
186
186
}
187
187
188
188
bool InstCombiner::isValidAddrSpaceCast (unsigned FromAS, unsigned ToAS) const {
189
- return TTI.isValidAddrSpaceCast (FromAS, ToAS);
189
+ // Approved exception for TTI use: This queries a legality property of the
190
+ // target, not an profitability heuristic. Ideally this should be part of
191
+ // DataLayout instead.
192
+ return TTIForTargetIntrinsicsOnly.isValidAddrSpaceCast (FromAS, ToAS);
190
193
}
191
194
192
195
Value *InstCombinerImpl::EmitGEPOffset (GEPOperator *GEP, bool RewriteGEP) {
0 commit comments