aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-c-test/debuginfo.c2
-rw-r--r--llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp6
2 files changed, 8 insertions, 0 deletions
diff --git a/llvm/tools/llvm-c-test/debuginfo.c b/llvm/tools/llvm-c-test/debuginfo.c
index e376d82..a2f4b3e 100644
--- a/llvm/tools/llvm-c-test/debuginfo.c
+++ b/llvm/tools/llvm-c-test/debuginfo.c
@@ -328,8 +328,10 @@ int llvm_test_dibuilder(void) {
// Test that LLVMGetFirstDbgRecord and LLVMGetLastDbgRecord return NULL for
// instructions without debug info.
LLVMDbgRecordRef Phi1FirstDbgRecord = LLVMGetFirstDbgRecord(Phi1);
+ (void)Phi1FirstDbgRecord;
assert(Phi1FirstDbgRecord == NULL);
LLVMDbgRecordRef Phi1LastDbgRecord = LLVMGetLastDbgRecord(Phi1);
+ (void)Phi1LastDbgRecord;
assert(Phi1LastDbgRecord == NULL);
// Insert a non-phi before the `ret` but not before the debug records to
diff --git a/llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp b/llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
index bdfc93e..707e6ee 100644
--- a/llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
+++ b/llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
@@ -57,6 +57,12 @@ computeAliasingInstructions(const LLVMState &State, const Instruction *Instr,
continue;
if (OtherInstr.hasMemoryOperands())
continue;
+ // Filtering out loads/stores might belong in hasMemoryOperands(), but that
+ // complicates things as there are instructions with may load/store that
+ // don't have operands (e.g. X86's CLUI instruction). So, it's easier to
+ // filter them out here.
+ if (OtherInstr.Description.mayLoad() || OtherInstr.Description.mayStore())
+ continue;
if (!ET.allowAsBackToBack(OtherInstr))
continue;
if (Instr->hasAliasingRegistersThrough(OtherInstr, ForbiddenRegisters))