(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
tree-ssa/
ssa-dom-thread-14.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -fdump-tree-dom2-details -w --param logical-op-non-short-circuit=1" } */
       3  /* { dg-additional-options "-fdisable-tree-thread1 -fdisable-tree-ethread -fdisable-tree-threadfull1" } */
       4  
       5  enum optab_methods
       6  {
       7    OPTAB_DIRECT,
       8    OPTAB_LIB,
       9    OPTAB_WIDEN,
      10    OPTAB_LIB_WIDEN,
      11    OPTAB_MUST_WIDEN
      12  };
      13  struct optab_d { };
      14  typedef struct optab_d *optab;
      15  void
      16  expand_shift_1 (int code, int unsignedp, int rotate,
      17  		optab lshift_optab, optab rshift_arith_optab)
      18  {
      19    int left = (code == 42 || code == 0xde);
      20    int attempt;
      21    enum optab_methods methods;
      22    if (attempt == 0)
      23      methods = OPTAB_DIRECT;
      24    else if (attempt == 1)
      25      methods = OPTAB_WIDEN;
      26    if ((!unsignedp || (!left && methods == OPTAB_WIDEN)))
      27      {
      28        enum optab_methods methods1 = methods;
      29        if (unsignedp)
      30  	methods1 = OPTAB_MUST_WIDEN;
      31        expand_binop (left ? lshift_optab : rshift_arith_optab,
      32  			   unsignedp, methods1);
      33      }
      34  }
      35  
      36  /* When UNSIGNEDP is true, LEFT is false and METHOD == OPTAB_WIDEN
      37     we will enter the TRUE arm of the conditional and we can thread
      38     the test to compute the first first argument of the expand_binop
      39     call if we look backwards through the boolean logicals.  */
      40  /* { dg-final { scan-tree-dump-times "Threaded" 2 "dom2"} } */
      41