llvm.org GIT mirror llvm / 151f40d
[llvm-stress] Remove Rand32 helper function To try and help avoid repeats of PR32585, remove Rand32 which is only called by Rand64 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306285 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 2 years ago
1 changed file(s) with 5 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
9595 return Seed & 0x7ffff;
9696 }
9797
98 /// Return a random 32 bit integer.
99 uint32_t Rand32() {
100 uint32_t Val = Rand();
101 Val &= 0xffff;
102 return Val | (Rand() << 16);
103 }
104
10598 /// Return a random 64 bit integer.
10699 uint64_t Rand64() {
107 uint64_t Val = Rand32();
108 return Val | (uint64_t(Rand32()) << 32);
100 uint64_t Val = Rand() & 0xffff;
101 Val |= uint64_t(Rand() & 0xffff) << 16;
102 Val |= uint64_t(Rand() & 0xffff) << 32;
103 Val |= uint64_t(Rand() & 0xffff) << 48;
104 return Val;
109105 }
110106
111107 /// Rand operator for STL algorithms.