From 48375e2d0bb7e535d5bac16a85376a6e18ee530c Mon Sep 17 00:00:00 2001 From: KomiMoe Date: Sun, 6 Oct 2024 10:00:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4Volatile=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=EF=BC=8C=E9=98=B2=E6=AD=A2clang=E4=BC=98=E5=8C=96=E7=88=86?= =?UTF-8?q?=E7=82=B8=EF=BC=8C=E8=87=B3=E4=BA=8E=E6=98=AF=E4=B8=BA=E4=BB=80?= =?UTF-8?q?=E4=B9=88=E4=BC=9A=E7=88=86=E7=82=B8=EF=BC=8C=E6=88=91=E4=B9=9F?= =?UTF-8?q?=E4=B8=8D=E7=9F=A5=E9=81=93=EF=BC=8C=E6=88=91=E4=B9=9F=E4=B8=8D?= =?UTF-8?q?=E6=83=B3=E7=9F=A5=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- llvm/lib/Transforms/Obfuscation/IndirectBranch.cpp | 4 ++-- llvm/lib/Transforms/Obfuscation/IndirectCall.cpp | 4 ++-- .../lib/Transforms/Obfuscation/IndirectGlobalVariable.cpp | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/llvm/lib/Transforms/Obfuscation/IndirectBranch.cpp b/llvm/lib/Transforms/Obfuscation/IndirectBranch.cpp index dd984e8d1ae2..205b92a1a750 100644 --- a/llvm/lib/Transforms/Obfuscation/IndirectBranch.cpp +++ b/llvm/lib/Transforms/Obfuscation/IndirectBranch.cpp @@ -260,7 +260,7 @@ struct IndirectBranch : public FunctionPass { Value *DecKey = EncKey; if (GXorKey) { - LoadInst *XorKey = IRB.CreateLoad(GXorKey->getValueType(), GXorKey, true); + LoadInst *XorKey = IRB.CreateLoad(GXorKey->getValueType(), GXorKey); if (opt.level() == 1) { DecKey = IRB.CreateXor(EncKey1, XorKey); @@ -274,7 +274,7 @@ struct IndirectBranch : public FunctionPass { if (XorKeys) { Value *XorKeysGEP = IRB.CreateGEP(XorKeys->getValueType(), XorKeys, {Zero, Idx}); - Value *XorKey = IRB.CreateLoad(intType, XorKeysGEP, true); + Value *XorKey = IRB.CreateLoad(intType, XorKeysGEP); XorKey = IRB.CreateNSWNeg(XorKey); XorKey = IRB.CreateXor(XorKey, EncKey1); diff --git a/llvm/lib/Transforms/Obfuscation/IndirectCall.cpp b/llvm/lib/Transforms/Obfuscation/IndirectCall.cpp index 0c1a4e984104..16b22b49a32e 100644 --- a/llvm/lib/Transforms/Obfuscation/IndirectCall.cpp +++ b/llvm/lib/Transforms/Obfuscation/IndirectCall.cpp @@ -260,7 +260,7 @@ struct IndirectCall : public FunctionPass { Value *DecKey = EncKey; if (GXorKey) { - LoadInst *XorKey = IRB.CreateLoad(GXorKey->getValueType(), GXorKey, true); + LoadInst *XorKey = IRB.CreateLoad(GXorKey->getValueType(), GXorKey); if (opt.level() == 1) { DecKey = IRB.CreateXor(EncKey1, XorKey); @@ -274,7 +274,7 @@ struct IndirectCall : public FunctionPass { if (XorKeys) { Value *XorKeysGEP = IRB.CreateGEP(XorKeys->getValueType(), XorKeys, {Zero, Idx}); - Value *XorKey = IRB.CreateLoad(intType, XorKeysGEP, true); + Value *XorKey = IRB.CreateLoad(intType, XorKeysGEP); XorKey = IRB.CreateNSWNeg(XorKey); XorKey = IRB.CreateXor(XorKey, EncKey1); diff --git a/llvm/lib/Transforms/Obfuscation/IndirectGlobalVariable.cpp b/llvm/lib/Transforms/Obfuscation/IndirectGlobalVariable.cpp index 9de01a832a8b..f61e66a56452 100644 --- a/llvm/lib/Transforms/Obfuscation/IndirectGlobalVariable.cpp +++ b/llvm/lib/Transforms/Obfuscation/IndirectGlobalVariable.cpp @@ -254,7 +254,7 @@ struct IndirectGlobalVariable : public FunctionPass { Value *DecKey = EncKey; if (GXorKey) { - LoadInst *XorKey = IRB.CreateLoad(GXorKey->getValueType(), GXorKey, true); + LoadInst *XorKey = IRB.CreateLoad(GXorKey->getValueType(), GXorKey); if (opt.level() == 1) { DecKey = IRB.CreateXor(EncKey1, XorKey); @@ -268,7 +268,7 @@ struct IndirectGlobalVariable : public FunctionPass { if (XorKeys) { Value *XorKeysGEP = IRB.CreateGEP(XorKeys->getValueType(), XorKeys, {Zero, Idx}); - Value *XorKey = IRB.CreateLoad(intType, XorKeysGEP, true); + Value *XorKey = IRB.CreateLoad(intType, XorKeysGEP); XorKey = IRB.CreateNSWNeg(XorKey); XorKey = IRB.CreateXor(XorKey, EncKey1); @@ -307,7 +307,7 @@ struct IndirectGlobalVariable : public FunctionPass { Value *DecKey = EncKey; if (GXorKey) { - LoadInst *XorKey = IRB.CreateLoad(GXorKey->getValueType(), GXorKey, true); + LoadInst *XorKey = IRB.CreateLoad(GXorKey->getValueType(), GXorKey); if (opt.level() == 1) { DecKey = IRB.CreateXor(EncKey1, XorKey); @@ -321,7 +321,7 @@ struct IndirectGlobalVariable : public FunctionPass { if (XorKeys) { Value *XorKeysGEP = IRB.CreateGEP(XorKeys->getValueType(), XorKeys, {Zero, Idx}); - Value *XorKey = IRB.CreateLoad(intType, XorKeysGEP, true); + Value *XorKey = IRB.CreateLoad(intType, XorKeysGEP); XorKey = IRB.CreateNSWNeg(XorKey); XorKey = IRB.CreateXor(XorKey, EncKey1);