https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81763

Manuel Lauss <manuel.lauss at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manuel.lauss at googlemail dot 
com

--- Comment #16 from Manuel Lauss <manuel.lauss at googlemail dot com> ---
I've seen this as well.
Build llvm-7 with gcc-7.3, -m32 -march=znver1 -mtune=broadwell
-O1 / -Og: all good
-O2: llvm-tblgen runs in an infinite(?) loop
-O3: llvm-tblgen segfaults

-mno-bmi: all good, at all optimization levels

In case it helps, here's gdb info:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x080a96c9 in llvm::MachineValueTypeSet::const_iterator::find_from_pos
(P=<optimized out>, this=<synthetic pointer>)
    at
/tmp-ram/x1/portage/sys-devel/llvm-9999/work/llvm-9999/utils/TableGen/CodeGenDAGPatterns.h:148
148             W &= maskLeadingOnes<WordType>(WordWidth-SkipBits);

(gdb) list
143
144           // If P is in the middle of a word, process it manually here,
because
145           // the trailing bits need to be masked off to use findFirstSet.
146           if (SkipBits != 0) {
147             WordType W = Set->Words[SkipWords];
148             W &= maskLeadingOnes<WordType>(WordWidth-SkipBits);
149             if (W != 0)
150               return Count + findFirstSet(W);
151             Count += WordWidth;
152             SkipWords++;

[...]
   0x080a968d <+1293>:  shr    $0x6,%ebx
   0x080a9690 <+1296>:  and    $0xffffffc0,%esi
   0x080a9693 <+1299>:  and    $0x3f,%eax
   0x080a9696 <+1302>:  je     0x80a96e0
<llvm::TypeInfer::EnforceSmallerThan(llvm::TypeSetByHwMode&,
llvm::TypeSetByHwMode&)+1376>
   0x080a9698 <+1304>:  mov    $0x40,%ecx
   0x080a969d <+1309>:  mov    $0xffffffff,%edx
   0x080a96a2 <+1314>:  xor    %edi,%edi
   0x080a96a4 <+1316>:  sub    %eax,%ecx
   0x080a96a6 <+1318>:  mov    $0xffffffff,%eax
   0x080a96ab <+1323>:  shrd   %cl,%edx,%eax
   0x080a96ae <+1326>:  test   $0x20,%cl
   0x080a96b1 <+1329>:  shrx   %ecx,%edx,%edx
   0x080a96b6 <+1334>:  cmovne %edx,%eax
   0x080a96b9 <+1337>:  cmovne %edi,%edx
   0x080a96bc <+1340>:  mov    %edx,%ecx
   0x080a96be <+1342>:  mov    %eax,%edx
   0x080a96c0 <+1344>:  mov    -0x3c(%ebp),%eax
   0x080a96c3 <+1347>:  andn   (%eax,%ebx,8),%edx,%eax
=> 0x080a96c9 <+1353>:  andn   0x4(%eax,%ebx,8),%ecx,%edx
   0x080a96d0 <+1360>:  mov    %edx,%edi
   0x080a96d2 <+1362>:  or     %eax,%edi
   0x080a96d4 <+1364>:  jne    0x80a9e70
<llvm::TypeInfer::EnforceSmallerThan(llvm::TypeSetByHwMode&,
llvm::TypeSetByHwMode&)+3312>
   0x080a96da <+1370>:  add    $0x40,%esi
   0x080a96dd <+1373>:  add    $0x1,%ebx
   0x080a96e0 <+1376>:  cmp    $0x4,%ebx
   0x080a96e3 <+1379>:  je     0x80a9e60
<llvm::TypeInfer::EnforceSmallerThan(llvm::TypeSetByHwMode&,
llvm::TypeSetByHwMode&)+3296>
   0x080a96e9 <+1385>:  mov    -0x3c(%ebp),%eax
   0x080a96ec <+1388>:  mov    0x4(%eax,%ebx,8),%edx
   0x080a96f0 <+1392>:  mov    (%eax,%ebx,8),%eax
   0x080a96f3 <+1395>:  mov    %edx,%ecx
   0x080a96f5 <+1397>:  or     %eax,%ecx
   0x080a96f7 <+1399>:  jne    0x80a9e42
<llvm::TypeInfer::EnforceSmallerThan(llvm::TypeSetByHwMode&,
llvm::TypeSetByHwMode&)+3266>
   0x080a96fd <+1405>:  lea    0x1(%ebx),%eax
[...]


(gdb) info registers
eax            0x18000040       402653248
ecx            0x0      0
edx            0x3f     63
ebx            0x0      0
esp            0xff8f9660       0xff8f9660
ebp            0xff8f96c8       0xff8f96c8
esi            0x0      0
edi            0x0      0
eip            0x80a96c9        0x80a96c9
<llvm::TypeInfer::EnforceSmallerThan(llvm::TypeSetByHwMode&,
llvm::TypeSetByHwMode&)+1353>
eflags         0x10202  [ IF RF ]
cs             0x23     35
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x0      0
gs             0x63     99

Reply via email to