fix llvm reduce

This commit is contained in:
nora 2023-05-30 16:57:03 +02:00
parent f2179d6acc
commit 1ba5be2ed2

View file

@ -1,9 +1,11 @@
#!/usr/bin/env bash
rustc code.rs --crate-name ll -Zmir-enable-passes=-ConstProp --emit llvm-ir -Cno-prepopulate-passes --crate-type=lib
set -eu
clang ll.ll helper.c -O1 -o good
clang ll.ll helper.c -O2 -o bad
# rustc code.rs --crate-name ll -Zmir-enable-passes=-ConstProp --emit llvm-ir -Cno-prepopulate-passes --crate-type=lib
clang $1 helper.c -O1 -o good
clang $1 helper.c -O2 -o bad
bad=$(./bad)
good=$(./good)
@ -12,4 +14,5 @@ if [ "$good" != "$bad" ]; then
echo "MISCOMPILATION"
else
echo "no repro"
exit 1
fi