llvm-project/llvm/test/CodeGen/WebAssembly
Peter Rong c2e7c9cb33 [CodeGen] Using ZExt for extractelement indices.
In https://github.com/llvm/llvm-project/issues/57452, we found that IRTranslator is translating `i1 true` into `i32 -1`.
This is because IRTranslator uses SExt for indices.

In this fix, we change the expected behavior of extractelement's index, moving from SExt to ZExt.
This change includes both documentation, SelectionDAG and IRTranslator.
We also included a test for AMDGPU, updated tests for AArch64, Mips, PowerPC, RISCV, VE, WebAssembly and X86

This patch fixes issue #57452.

Differential Revision: https://reviews.llvm.org/D132978
2022-10-15 15:45:35 -07:00
..
PR40172.ll
PR40267.ll
PR41149.ll [SelectionDAG] Add a freeze to ISD::ABS expansion. 2022-05-22 14:29:58 -07:00
PR41841.ll
add-prototypes-conflict.ll [WebAssembly] Support opaque pointers in AddMissingPrototypes 2021-09-04 11:25:42 +02:00
add-prototypes-opaque-ptrs.ll [OpaquePtr] Forbid mixing typed and opaque pointers 2021-09-10 15:18:23 +02:00
add-prototypes.ll
address-offsets.ll
aliases.ll
atomic-fence.ll
atomic-fence.mir
atomic-mem-consistency.ll
atomic-pic.ll
atomic-rmw.ll
bulk-memory.ll
bulk-memory64.ll
byval.ll [WebAssembly] Always emit functype directives for defined functions 2022-03-22 09:24:58 +00:00
call-indirect.ll [WebAssembly] Covert llvm/test/MC/WebAssembly/reloc-code.ll to asm. NFC 2022-02-25 07:12:32 -08:00
call-pic.ll
call.ll
cfg-stackify-dbg-skip.ll
cfg-stackify-dbg.mir
cfg-stackify-eh.ll [WebAssembly] Always emit functype directives for defined functions 2022-03-22 09:24:58 +00:00
cfg-stackify-eh.mir
cfg-stackify.ll
cfi.ll [test] Change -lowertypetests tests to -passes= 2022-07-17 15:03:46 -07:00
clear-cache.ll
comparisons-f32.ll
comparisons-f64.ll
comparisons-i32.ll
comparisons-i64.ll
conv-trap.ll
conv.ll
copysign-casts.ll
cpus.ll
custom-sections.ll
dbgvalue.ll
dead-vreg.ll
debugtest-opt.ll
debugtrap.ll
divrem-constant.ll
eh-lsda.ll [WebAssembly] Make EH work with dynamic linking 2021-10-12 23:28:27 -07:00
exception.ll [WebAssembly] Tidy up EH/SjLj options 2021-08-24 17:54:39 -07:00
exception.mir
explicit-locals.mir
export-name.ll
externref-globalget.ll [WebAssembly][NFC] Update reftype and table tests to use opaque pointers 2022-06-20 10:57:41 +01:00
externref-globalset.ll [WebAssembly][NFC] Update reftype and table tests to use opaque pointers 2022-06-20 10:57:41 +01:00
externref-inttoptr.ll [WebAssembly][NFC] Update reftype and table tests to use opaque pointers 2022-06-20 10:57:41 +01:00
externref-ptrtoint.ll [WebAssembly][NFC] Update reftype and table tests to use opaque pointers 2022-06-20 10:57:41 +01:00
externref-tableget.ll [WebAssembly] Use intrinsics for table.get/set instructions 2022-09-27 09:16:30 +02:00
externref-tableset.ll [WebAssembly] Use intrinsics for table.get/set instructions 2022-09-27 09:16:30 +02:00
externref-unsized-load.ll [WebAssembly][NFC] Update reftype and table tests to use opaque pointers 2022-06-20 10:57:41 +01:00
externref-unsized-store.ll [WebAssembly][NFC] Update reftype and table tests to use opaque pointers 2022-06-20 10:57:41 +01:00
f16.ll
f32.ll
f64.ll
fast-isel-br-i1.ll
fast-isel-call-indirect64.ll
fast-isel-i24.ll
fast-isel-i256.ll
fast-isel-noreg.ll
fast-isel-pr47040.ll
fast-isel.ll
fpclamptosat.ll [DAG] Create fptoui.sat from clamped fptoui 2022-01-26 08:37:44 +00:00
fpclamptosat_vec.ll [WebAssembly] Improve codegen for shuffles with undefined lane indices 2022-09-13 16:03:18 -07:00
frem.ll
fshl.ll
func.ll [WebAssembly][MC] Update tests after recent removal of .size directives for functions 2022-08-31 14:54:13 -07:00
funcref-call.ll [WebAssembly][NFC] Update reftype and table tests to use opaque pointers 2022-06-20 10:57:41 +01:00
funcref-globalget.ll [WebAssembly][NFC] Update reftype and table tests to use opaque pointers 2022-06-20 10:57:41 +01:00
funcref-globalset.ll [WebAssembly][NFC] Update reftype and table tests to use opaque pointers 2022-06-20 10:57:41 +01:00
funcref-table_call.ll [WebAssembly] Use intrinsics for table.get/set instructions 2022-09-27 09:16:30 +02:00
funcref-tableget.ll [WebAssembly] Use intrinsics for table.get/set instructions 2022-09-27 09:16:30 +02:00
funcref-tableset.ll [WebAssembly] Use intrinsics for table.get/set instructions 2022-09-27 09:16:30 +02:00
function-addr-offset.ll
function-bitcasts-varargs.ll
function-bitcasts.ll [OpaquePtr] Forbid mixing typed and opaque pointers 2021-09-10 15:18:23 +02:00
function-info.mir
function-pointer64.ll [WebAssembly] Always emit functype directives for defined functions 2022-03-22 09:24:58 +00:00
functype-emission.ll [WebAssembly] Always emit functype directives for defined functions 2022-03-22 09:24:58 +00:00
global-get-unlowerable.ll [WebAssembly] Produce error when encountering unlowerable Wasm global accesses 2022-08-10 10:34:10 +01:00
global-get.ll [WebAssembly] Refactor and fix emission of external IR global decls 2022-02-04 22:01:46 +01:00
global-set-unlowerable.ll [WebAssembly] Produce error when encountering unlowerable Wasm global accesses 2022-08-10 10:34:10 +01:00
global-set.ll [WebAssembly] Refactor and fix emission of external IR global decls 2022-02-04 22:01:46 +01:00
global.ll [MC] Omit fill value if it's zero when emitting code alignment 2022-08-25 10:07:33 -07:00
global_dtors.ll
globl.ll [WebAssembly][MC] Update tests after recent removal of .size directives for functions 2022-08-31 14:54:13 -07:00
i32-load-store-alignment.ll
i32.ll
i64-load-store-alignment.ll
i64.ll
i128-returned.ll
i128.ll
ident.ll
immediates.ll
implicit-def.ll
import-module.ll
indirect-import.ll
indirectbr.ll
inline-asm-m.ll
inline-asm-roundtrip.ll
inline-asm.ll [Tests] Add elementtype attribute to indirect inline asm operands (NFC) 2022-01-06 14:23:51 +01:00
inlineasm-output-template.ll [WebAssembly] Always emit functype directives for defined functions 2022-03-22 09:24:58 +00:00
ir-locals-stackid.ll
ir-locals.ll
irreducible-cfg-exceptions.ll
irreducible-cfg.ll
irreducible-cfg.mir [WebAssembly] Fix register use-def in FixIrreducibleControlFlow 2022-05-19 11:13:37 -07:00
legalize.ll
libcalls.ll [FileCheck] Catch missspelled directives. 2022-05-26 11:37:19 +01:00
lit.local.cfg
llround-conv-i32.ll
load-ext-atomic.ll
load-ext.ll
load-store-i1.ll
load-store-pic.ll
load-store-static.ll
load.ll
lower-em-ehsjlj-multi-return.ll
lower-em-ehsjlj-options.ll
lower-em-ehsjlj.ll [SSAUpdaterImpl] Do not generate phi node with all the same incoming values 2022-06-03 12:24:33 +07:00
lower-em-exceptions-allowed.ll [WebAssembly] Tidy up EH/SjLj options 2021-08-24 17:54:39 -07:00
lower-em-exceptions-resume-only.ll [WebAssembly] Tidy up EH/SjLj options 2021-08-24 17:54:39 -07:00
lower-em-exceptions.ll [NFC] Switch a few uses of undef to poison as placeholders for unreachable code 2022-07-30 13:55:56 +01:00
lower-em-sjlj-alias.ll [WebAssembly] Use entry block only for initializations in EmSjLj 2021-08-25 15:46:57 -07:00
lower-em-sjlj-debuginfo.ll [WebAssembly] Share rethrowing BBs in LowerEmscriptenEHSjLj 2021-08-30 21:44:34 -07:00
lower-em-sjlj-indirect-setjmp.ll [WebAssembly][test] Fix lower-em-sjlj-indirect-setjmp.ll after D109375 2021-09-08 00:21:30 -07:00
lower-em-sjlj-sret.ll
lower-em-sjlj.ll [WebAssembly] WebAssemblyLowerEmscriptenEHSjLj: Fix signature of malloc in wasm64 mode 2022-08-17 18:16:34 -07:00
lower-global-dtors.ll
lower-wasm-ehsjlj.ll [WebAssembly] Nullify unnecessary setjmp invokes 2022-01-27 21:11:10 -08:00
lower-wasm-sjlj.ll [WebAssembly] WebAssemblyLowerEmscriptenEHSjLj: Fix signature of malloc in wasm64 mode 2022-08-17 18:16:34 -07:00
main-declaration.ll [OpaquePtr] Forbid mixing typed and opaque pointers 2021-09-10 15:18:23 +02:00
main-no-args.ll
main-three-args.ll
main-with-args.ll
masked-shifts.ll
mem-intrinsics.ll
memory-addr32.ll
memory-addr64.ll
memory64-feature.ll [WebAssembly] support Memory64 in target_features section 2021-10-25 09:31:45 -07:00
muloti4.ll
multi-return.ll [WebAssembly] Always emit functype directives for defined functions 2022-03-22 09:24:58 +00:00
multivalue-stackify.ll
multivalue-stackify.py
multivalue.ll
mutable-globals.ll
negative-base-reg.ll
null-streamer.ll [WebAssembly] Tidy up EH/SjLj options 2021-08-24 17:54:39 -07:00
offset-atomics.ll
offset-fastisel.ll
offset-folding.ll
offset.ll
only-data.ll [WebAssembly] Refactor and fix emission of external IR global decls 2022-02-04 22:01:46 +01:00
phi.ll
pr47375.ll
pr51651.ll [WebAssembly] Fix FastISel of condition in different block (PR51651) 2021-08-28 10:28:24 +02:00
ref-null.ll [WebAssembly][NFC] Update reftype and table tests to use opaque pointers 2022-06-20 10:57:41 +01:00
reference-types.ll
reg-argument.mir
reg-copy.mir
reg-stackify.ll [WebAssembly] Fix register use-def in FixIrreducibleControlFlow 2022-05-19 11:13:37 -07:00
return-address-emscripten.ll [WebAssembly] Fix return type of __builtin_return_address under wasm64 2022-10-03 08:31:52 -07:00
return-address-unknown.ll
return-int32.ll
return-void.ll
returned.ll
select.ll
signext-arg.ll
signext-inreg.ll
signext-zeroext.ll
simd-arith.ll [WebAssembly] Improve codegen for v128.bitselect 2022-08-03 23:28:37 -07:00
simd-bitcasts.ll
simd-bitmask-mask.ll
simd-build-pair.ll
simd-build-vector.ll [CodeGen] Using ZExt for extractelement indices. 2022-10-15 15:45:35 -07:00
simd-comparisons.ll
simd-concat.ll [WebAssembly] Improve codegen for shuffles with undefined lane indices 2022-09-13 16:03:18 -07:00
simd-conversions.ll [WebAssembly] Improve codegen for shuffles with undefined lane indices 2022-09-13 16:03:18 -07:00
simd-extended-extract.ll
simd-extending.ll [WebAssembly] Improve codegen for shuffles with undefined lane indices 2022-09-13 16:03:18 -07:00
simd-illegal-signext.ll
simd-intrinsics.ll [WebAssembly] Prototype `f32x4.relaxed_dot_bf16x8_add_f32` 2022-09-08 08:07:49 -07:00
simd-load-lane-offset.ll
simd-load-promote-wide.ll [WebAssembly] Lower v2f32 to v2f64 extending loads with promote_low 2021-09-01 10:27:42 -07:00
simd-load-splat.ll
simd-load-store-alignment.ll
simd-load-zero-offset.ll
simd-nested-shuffles.ll
simd-offset.ll [WebAssembly] Improve codegen for loading scalars from memory to v128 2022-09-21 21:05:44 -07:00
simd-pr51605.ll [WebAssembly] Fix up out-of-range BUILD_VECTOR lane constants 2021-08-24 17:24:03 -07:00
simd-reductions.ll
simd-select.ll
simd-sext-inreg.ll
simd-shift-complex-splats.ll
simd-shuffle-bitcast.ll
simd-simplify-demanded-vector-elts.ll [WebAssembly] Disable SimplifyDemandedVectorElts after legalization 2022-03-16 20:52:43 -07:00
simd-unsupported.ll [RISCV][WebAssembly][TargetLowering] Allow expandCTLZ/expandCTTZ to rely on CTPOP expansion for vectors. 2021-10-20 07:46:41 -07:00
simd-vector-trunc.ll [WebAssembly] Add simd-vector-trunc.ll test missing from 2a4a229 2021-12-15 09:22:40 -08:00
simd.ll [WebAssembly] Improve codegen for shuffles with undefined lane indices 2022-09-13 16:03:18 -07:00
snan_literal.ll
stack-alignment.ll
stack-insts.ll
stack-protector.ll [WebAssembly] Always emit functype directives for defined functions 2022-03-22 09:24:58 +00:00
stackified-debug.ll
store-trunc-atomic.ll
store-trunc.ll
store.ll
swiftcc.ll
switch-in-loop.ll
switch-unreachable-default.ll
switch.ll
table-copy.ll [WebAssembly][NFC] Update reftype and table tests to use opaque pointers 2022-06-20 10:57:41 +01:00
table-fill.ll [WebAssembly][NFC] Update reftype and table tests to use opaque pointers 2022-06-20 10:57:41 +01:00
table-grow.ll [WebAssembly][NFC] Update reftype and table tests to use opaque pointers 2022-06-20 10:57:41 +01:00
table-size.ll [WebAssembly][NFC] Update reftype and table tests to use opaque pointers 2022-06-20 10:57:41 +01:00
table-types.ll [WebAssembly][NFC] Update reftype and table tests to use opaque pointers 2022-06-20 10:57:41 +01:00
tailcall.ll
target-features-tls.ll [WebAssembly] Strip TLS when "atomics" is not enabled 2022-05-20 15:18:19 -07:00
target-features.ll
tls-general-dynamic.ll [WebAssembly] Use `localexec` as default TLS model for non-Emscripten targets 2022-07-25 13:25:46 -07:00
tls-local-exec.ll [WebAssembly] Use `localexec` as default TLS model for non-Emscripten targets 2022-07-25 13:25:46 -07:00
umulo-128-legalisation-lowering.ll [WebAssembly] Fix register use-def in FixIrreducibleControlFlow 2022-05-19 11:13:37 -07:00
umulo-i64.ll [WebAssembly] Fix register use-def in FixIrreducibleControlFlow 2022-05-19 11:13:37 -07:00
unreachable.ll
unsupported-function-bitcasts.ll
unused-argument.ll
userstack.ll
varargs.ll
vector-sdiv.ll
vtable.ll
wasm-eh-em-sjlj-error.ll [WebAssembly] Improve EH/SjLj error messages 2022-03-16 20:50:34 -07:00
wasm-eh-sjlj-setjmp-within-catch.ll [WebAssembly] Improve EH/SjLj error messages 2022-03-16 20:50:34 -07:00
wasmehprepare.ll [WebAssembly] Make EH/SjLj vars unconditionally thread local 2022-02-17 16:04:18 -08:00
weak.ll
xor_reassociate.ll [SelectionDAG][DAGCombiner] Reuse exist node by reassociate 2022-06-24 23:15:06 +08:00