http://llvm.org/bugs/show_bug.cgi?id=6664
Summary: llvm.atomic.load.nand poorly documented
Product: libraries
Version: trunk
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Most programmers would expect an operation called "nand" to perform ~(A & B),
but llvm.atomic.load.nand performs (A & ~B). According to ddunbar, this was
done for compatibility with gcc, but gcc has changed its behavior in version
4.4 to match the intended semantics:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37908#c6
To further confuse matters, example code given at
http://llvm.org/docs/LangRef.html#int_atomic_load_nand implies that
llvm.atomic.load.nand performs a traditional NAND operation, rather than (A &
~B).
It seems like either:
1) The behavior of llvm.atomic.load.nand should be changed to match GCC 4.4
(and its name), or
2) llvm.atomic.load.nand should be renamed to something like
llvm.atomic.load.andn, and the documentation updated to reflect its true
semantics.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs