[llvm-dev] TryToShrinkGlobalToBoolean in GlobalOpt.cpp issue

Ryan Taylor via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 30 13:01:23 PDT 2016


Given some code:

static int x = 100;

int main() {
   x = 101;
   printf("%d\n", x);
}

results in:

%0 = load i1
%1 = select %0, 101, 100
...
...

1) What architecture(s) does this benefit?
2) What's the best way to circumvent this in the backend (currently I am
just not allowing this opt function to run)? I have tried a few
setOperationAction methods to no result. Rather not just comment out core
code because it makes porting more difficult.

-Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160830/252e598a/attachment.html>


More information about the llvm-dev mailing list