llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.55k stars 11.8k forks source link

non-trivial scalar-to-vector conversion when building valid-looking LLVM IR for MIPS #48894

Open nagisa opened 3 years ago

nagisa commented 3 years ago
Bugzilla Link 49550
Version trunk
OS Windows NT

Extended Description

; RUN: llc -mtriple=mips64el-unknown-linux-gnu define <3 x i1> @​test_srem_vec(<3 x i32> %X) nounwind { %srem = srem <3 x i32> %X, <i32 9, i32 9, i32 -9> %cmp = icmp ne <3 x i32> %srem, <i32 3, i32 -3, i32 3> ret <3 x i1> %cmp }

This appears to be caused by the vector length of 3, works fine with vectors of 4 items. Also appears to work on the regular MIPS.

nagisa commented 3 years ago

Note: I suspect LLVM may need to be built with assertions in order to reproduce.