[llvm] r342878 - Fix some missing opcodes in bcanalyzer
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 24 05:47:17 PDT 2018
Author: arsenm
Date: Mon Sep 24 05:47:17 2018
New Revision: 342878
URL: http://llvm.org/viewvc/llvm-project?rev=342878&view=rev
Log:
Fix some missing opcodes in bcanalyzer
Added:
llvm/trunk/test/Bitcode/bcanalyzer-atomics.ll
Modified:
llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
Added: llvm/trunk/test/Bitcode/bcanalyzer-atomics.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/bcanalyzer-atomics.ll?rev=342878&view=auto
==============================================================================
--- llvm/trunk/test/Bitcode/bcanalyzer-atomics.ll (added)
+++ llvm/trunk/test/Bitcode/bcanalyzer-atomics.ll Mon Sep 24 05:47:17 2018
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | llvm-bcanalyzer -dump | FileCheck %s
+; Make sure the names of atomics are known
+
+; CHECK: INST_CMPXCHG
+; CHECK: INST_STOREATOMIC
+; CHECK: INST_LOADATOMIC
+; CHECK: INST_FENCE
+define void @atomics(i32* %ptr) {
+ store atomic i32 0, i32* %ptr monotonic, align 4
+ %load = load atomic i32, i32* %ptr monotonic, align 4
+ %xchg = cmpxchg i32* %ptr, i32 0, i32 5 acquire monotonic
+ fence seq_cst
+ ret void
+}
Modified: llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp?rev=342878&r1=342877&r2=342878&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp (original)
+++ llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp Mon Sep 24 05:47:17 2018
@@ -285,6 +285,11 @@ static const char *GetCodeName(unsigned
STRINGIFY_CODE(FUNC_CODE, DEBUG_LOC)
STRINGIFY_CODE(FUNC_CODE, INST_GEP)
STRINGIFY_CODE(FUNC_CODE, OPERAND_BUNDLE)
+ STRINGIFY_CODE(FUNC_CODE, INST_FENCE)
+ STRINGIFY_CODE(FUNC_CODE, INST_ATOMICRMW)
+ STRINGIFY_CODE(FUNC_CODE, INST_LOADATOMIC)
+ STRINGIFY_CODE(FUNC_CODE, INST_STOREATOMIC)
+ STRINGIFY_CODE(FUNC_CODE, INST_CMPXCHG)
}
case bitc::VALUE_SYMTAB_BLOCK_ID:
switch (CodeID) {
More information about the llvm-commits
mailing list