We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b0aaef commit 1d81108Copy full SHA for 1d81108
llvm/lib/Target/DirectX/DXILPrepare.cpp
@@ -240,12 +240,10 @@ class DXILPrepareModule : public ModulePass {
240
for (size_t Idx = 0, End = F.arg_size(); Idx < End; ++Idx)
241
F.removeParamAttrs(Idx, AttrMask);
242
243
- // Match FnAttrs of lifetime intrinsics in LLVM 3.7
244
- if (F.isIntrinsic())
245
- switch (F.getIntrinsicID())
246
- case Intrinsic::lifetime_start:
247
- case Intrinsic::lifetime_end:
248
- F.removeFnAttr(Attribute::Memory);
+ // Lifetime intrinsics in LLVM 3.7 do not have the memory FnAttr
+ if (Intrinsic::ID IID = F.getIntrinsicID();
+ IID == Intrinsic::lifetime_start || IID == Intrinsic::lifetime_end)
+ F.removeFnAttr(Attribute::Memory);
249
250
for (auto &BB : F) {
251
IRBuilder<> Builder(&BB);
0 commit comments