[llvm] Revert 112e49b38150b8bfdef01434309d1b05204193e4 due to a miscompile (PR #71598)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 10:19:52 PST 2023


goldsteinn wrote:

Okay appears the impl is using the wrong type size somewhere
The transform taking place is:
From:
```
t24: i1 = setcc t19, t22, setne:ch
  t19: i32 = and t3, Constant:i32<7>
    t3: i32 = truncate t2
      t2: i64,ch = CopyFromReg t0, Register:i64 %1
        t0: ch,glue = EntryToken
  t22: i32 = srl t3, Constant:i8<5>
```
To:
```
t33: i1 = setcc t32, t30, setne:ch
  t32: i32 = and t3, Constant:i32<-32>
    t3: i32 = truncate t2
      t2: i64,ch = CopyFromReg t0, Register:i64 %1
        t0: ch,glue = EntryToken
  t30: i32 = shl t3, Constant:i8<5>
```

Which is correct for i8, not i32 though.

https://github.com/llvm/llvm-project/pull/71598


More information about the llvm-commits mailing list