[PATCH] D66537: [DAGCombiner] Remove a bunch of redundant AddToWorklist calls.

Richard Trieu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 19:04:08 PDT 2019


rtrieu added a comment.

I have reverted this in r370006.

C-Reduce has created the following testcase:

  $ cat run.sh
  clang \ 
  "-cc1" \
  "-triple" "x86_64-unknown-linux-gnu" \
  "-emit-obj" \
  "-fprofile-instrument=llvm" \
  "-fprofile-instrument-path=/dev/null" \
  "-O3" \
  "-x" "c++" "test.ii"
  
  $ cat test.ii
  struct c {
    int *b;
    int operator[](long g) {
      return b[g];
    }
  };
  
  struct i {
    unsigned j : 32;
    unsigned k : 32;
    unsigned l : 32;
    unsigned m : 32;
  };
  
  c q;
  i o;
  
  void fn1() {
    o.j = 1;
    o.k = q[1];
    o.l = q[1];
    o.m = q[1];
  }
  
  $ ./run.sh
  fatal error: error in backend: Cannot select: 0x6169578: i64 = shl 0x61696b0, Constant:i64<32>
    0x61696b0: i64,ch = load<(dereferenceable load 4 from `i128* getelementptr inbounds (%struct.i, %struct.i* @o, i64 0, i32 0)` + 12), zext from i32> 0x6057d28, 0x6165cc0, undef:i64
      0x6165cc0: i64 = add nuw 0x6169100, Constant:i64<4>
        0x6169100: i64 = add 0x61693d8, Constant:i64<8>
          0x61693d8: i64,ch = load<(load 8 from got)> 0x6057d28, 0x61692a0, undef:i64
            0x61692a0: i64 = X86ISD::WrapperRIP TargetGlobalAddress:i64<%struct.i* @o> 0 [TF=5]
              0x6166270: i64 = TargetGlobalAddress<%struct.i* @o> 0 [TF=5]
            0x6165d90: i64 = undef
          0x6168cf0: i64 = Constant<8>
        0x6166340: i64 = Constant<4>
      0x6165d90: i64 = undef
    0x61697e8: i64 = Constant<32>
  In function: _Z3fn1v


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66537/new/

https://reviews.llvm.org/D66537





More information about the llvm-commits mailing list