Open Quuxplusone opened 6 years ago
Attached stepanov_v1p2.ii
(2112 bytes, text/plain): reduced testcase
You generally can't disable basicaa if you also leave tbaa enabled. Is tbaa also enabled (because many codes have UB but we depend on basicaa overriding tbaa in order to do what the programmer intended)?
(In reply to Hal Finkel from comment #1)
> You generally can't disable basicaa if you also leave tbaa enabled. Is tbaa
> also enabled (because many codes have UB but we depend on basicaa overriding
> tbaa in order to do what the programmer intended)?
Shouldn't this be fixed then somehow so that if -disable-basicaa is passed,
then tbaa is also automatically disabled?
Anyway, the test case still fails the same way without tbaa like:
bin/clang -O3 -march=z13 ./stepanov_v1p2.ii -o ./a.out; ./a.out
test 0 passed: 6000.000000 == 6000.000000
bin/clang -O3 -march=z13 ./stepanov_v1p2.ii -o ./a.out -mllvm -disable-basicaa -
mllvm -enable-tbaa=false; ./a.out
test 0 failed: 0.000000 != 6000.000000
(In reply to Jonas Paulsson from comment #2)
> (In reply to Hal Finkel from comment #1)
> > You generally can't disable basicaa if you also leave tbaa enabled. Is tbaa
> > also enabled (because many codes have UB but we depend on basicaa overriding
> > tbaa in order to do what the programmer intended)?
>
> Shouldn't this be fixed then somehow so that if -disable-basicaa is passed,
> then tbaa is also automatically disabled?
No. The programs in question are still incorrect. We're just being less kind ;)
>
> Anyway, the test case still fails the same way without tbaa like:
>
> bin/clang -O3 -march=z13 ./stepanov_v1p2.ii -o ./a.out; ./a.out
> test 0 passed: 6000.000000 == 6000.000000
>
> bin/clang -O3 -march=z13 ./stepanov_v1p2.ii -o ./a.out -mllvm
> -disable-basicaa -mllvm -enable-tbaa=false; ./a.out
> test 0 failed: 0.000000 != 6000.000000
Interesting.
stepanov_v1p2.ii
(2112 bytes, text/plain)