rnk added inline comments.
================ Comment at: lib/CodeGen/CGBuiltin.cpp:570 + llvm::AtomicOrdering::SequentiallyConsistent); + llvm::Value *Shifted = Builder.CreateLShr(RMWI, Bit); + llvm::Value *Truncated = ---------------- Can you comment that this shifts the relevant bit into the low bit, truncates to i8, and then tests the low bit? At first I was thinking "of course, we just do AND %old, $constant to test the bit". Do we successfully pattern match this idiom to `lock bts`? Is there a pattern match we should target? https://reviews.llvm.org/D31736 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits