[llvm-dev] Store unswitch

Hongbin Zheng via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 25 21:24:57 PDT 2017


Hi,

Is there a pass in LLVM that can optimize:

if (x)
  a[i] = y0;
else
  a[i] = y1;

to

a[i] = x ? y0 : y1?

I tried opt (3.9) with -O3 but looks like such an optimization do not
happened.

Thanks
Hongbin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170425/6ddb8d7e/attachment.html>


More information about the llvm-dev mailing list