Skip to content
  • Chris Lattner's avatar
    Refactor EvaluateScalarValueToBool out of if statement emission, so it can · f0106d25
    Chris Lattner authored
    be shared.
    
    Implement infrastructure for unary operator emission.
    
    Implement basic logical not support.  We now compile:
    
      register short X;
    
      if (!X) {
    
    into:
    
            %tmp = load i16* %X             ; <i16> [#uses=1]
            %tobool = icmp ne i16 %tmp, 0           ; <i1> [#uses=1]
            %lnot = xor i1 %tobool, true            ; <i1> [#uses=1]
            zext i1 %lnot to i32            ; <i32>:0 [#uses=1]
            %tobool1 = icmp ne i32 %0, 0            ; <i1> [#uses=1]
            br i1 %tobool1, label %ifthen, label %ifend
    
    llvm-svn: 39559
    f0106d25
Loading