search for: atomictmp

Displaying 2 results from an estimated 2 matches for "atomictmp".

Did you mean: atomicrmw
2014 Apr 01
2
[LLVMdev] LLVM is doing something a bit weird in this example (which messes up DSA)
...ssert(*z == y); >> return 0; >> } >> >> Now, when compiled into LLVM IR 3.4 (with -mem2reg), an interesting >> thing happens in this LLVM IR excerpt: >> %1 = bitcast i32** %z to i64* >> %2 = bitcast i32** %x to i64* >> %3 = bitcast i32** %.atomictmp to i64* >> %4 = load i64* %2, align 8 >> %5 = load i64* %3, align 8 >> %6 = cmpxchg i64* %1, i64 %4, i64 %5 monotonic >> >> More specifically, there is this %2 bitcast and the subsequent %4 load >> that effectively turned an i32* pointer value into an i6...
2014 Mar 31
2
[LLVMdev] LLVM is doing something a bit weird in this example (which messes up DSA)
...y = 0; int *z = x; CAS(&z,x,&y); // if (z == x) z = &y; assert(*z == y); return 0; } Now, when compiled into LLVM IR 3.4 (with -mem2reg), an interesting thing happens in this LLVM IR excerpt: %1 = bitcast i32** %z to i64* %2 = bitcast i32** %x to i64* %3 = bitcast i32** %.atomictmp to i64* %4 = load i64* %2, align 8 %5 = load i64* %3, align 8 %6 = cmpxchg i64* %1, i64 %4, i64 %5 monotonic More specifically, there is this %2 bitcast and the subsequent %4 load that effectively turned an i32* pointer value into an i64 integer value without using ptrtoint instruction. My f...