[LLVMdev] Pass to simplify struct select?

Andrew Clinton andrew at sidefx.com
Tue Oct 1 15:16:48 PDT 2013


I have the following in my code:

%RayInfo = type { double }
...
   %ray.0 = select i1 %return, %RayInfo { double 1.000000e+00 }, 
%RayInfo zeroinitializer
   %clr = extractvalue %RayInfo %ray.0, 0


Is there a pass that will split the struct into a scalar? I've tried 
scalar replacement of aggregates and instruction combining and a bunch 
of other passes, without success so far.

Andrew



More information about the llvm-dev mailing list