diff options
author | Chris Lattner <sabre@nondot.org> | 2005-02-15 05:52:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-02-15 05:52:14 +0000 |
commit | 3bef66fcf3cd6ded6cded2a4fe539212b3736146 (patch) | |
tree | 13e53d121cc6c49d722eb2541f1099e437922b38 /llvm/lib/Support/FileUtilities.cpp | |
parent | 1f031b20fe4cf10a34508e94281724fbe81f8a47 (diff) | |
download | llvm-3bef66fcf3cd6ded6cded2a4fe539212b3736146.zip llvm-3bef66fcf3cd6ded6cded2a4fe539212b3736146.tar.gz llvm-3bef66fcf3cd6ded6cded2a4fe539212b3736146.tar.bz2 |
Fix volatile load/store of pointers. Consider this testcase:
void %test(int** %P) {
%A = volatile load int** %P
ret void
}
void %test2(int*** %Q) {
%P = load int*** %Q
volatile store int** %P, int*** %Q
ret void
}
instead of emitting:
void test(int **l1_P) {
int *l2_A;
l2_A = (int **((volatile int **)l1_P));
return;
}
void test2(int ***l2_Q) {
int **l1_P;
l1_P = *l2_Q;
*((volatile int ***)l2_Q) = l1_P;
return;
}
... which is loading/storing volatile pointers, not through volatile pointers,
emit this (which is right):
void test(int **l1_P) {
int *l3_A;
l3_A = *((int * volatile*)l1_P);
return;
}
void test2(int ***l2_Q) {
int **l1_P;
l1_P = *l2_Q;
*((int ** volatile*)l2_Q) = l1_P;
return;
}
llvm-svn: 20191
Diffstat (limited to 'llvm/lib/Support/FileUtilities.cpp')
0 files changed, 0 insertions, 0 deletions