You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With llvm/clang r359863, running "clang -emit-llvm -O2 -g -S" on the code below, the dbg.value representing the assignment of "local = q" is dropped by SimplifyCFG. From the names of the basic blocks, it would appear to be the SinkCommonCodeFromPredecessors function that does the dropping.
--------8<--------
volatile int g, *x;
int baz(int p, int q) {
int local;
local = p;
switch (g) {
case 1:
x[1] = local;
g += p;
break;
case 2:
x[1] += p;
break;
case 3:
local = q;
g++;
break;
}
return 4 + q;
}
-------->8--------
In this particular test case the impact of dropping the "local=q" assignment is that the "local=p" assignment dominates all blocks, and an incorrect location for "local" is produce in the "case 3" and exit block. (Didn't test this as far as a debugger because I believe the error is fairly clear).
The text was updated successfully, but these errors were encountered:
Extended Description
With llvm/clang r359863, running "clang -emit-llvm -O2 -g -S" on the code below, the dbg.value representing the assignment of "local = q" is dropped by SimplifyCFG. From the names of the basic blocks, it would appear to be the SinkCommonCodeFromPredecessors function that does the dropping.
--------8<--------
volatile int g, *x;
int baz(int p, int q) {
int local;
local = p;
switch (g) {
case 1:
x[1] = local;
g += p;
break;
case 2:
x[1] += p;
break;
case 3:
local = q;
g++;
break;
}
return 4 + q;
}
-------->8--------
In this particular test case the impact of dropping the "local=q" assignment is that the "local=p" assignment dominates all blocks, and an incorrect location for "local" is produce in the "case 3" and exit block. (Didn't test this as far as a debugger because I believe the error is fairly clear).
The text was updated successfully, but these errors were encountered: