[PATCH] [X86] replace (atomic fetch_add of 0) by (mfence; mov)
David Majnemer
david.majnemer at gmail.com
Wed Aug 27 15:30:18 PDT 2014
================
Comment at: lib/Target/X86/X86ISelDAGToDAG.cpp:1777-1792
@@ +1776,18 @@
+ unsigned Opc;
+ switch(NVT.SimpleTy) {
+ case MVT::i8:
+ Opc = X86::ACQUIRE_MOV8rm;
+ break;
+ case MVT::i16:
+ Opc = X86::ACQUIRE_MOV16rm;
+ break;
+ case MVT::i32:
+ Opc = X86::ACQUIRE_MOV32rm;
+ break;
+ case MVT::i64:
+ Opc = X86::ACQUIRE_MOV64rm;
+ break;
+ default:
+ llvm_unreachable("Unexpected size for LXADD 0");
+ }
+
----------------
This should be formatted per the coding standards; consider running clang-format on your changes.
http://reviews.llvm.org/D5091
More information about the llvm-commits
mailing list